diff options
| author | Thomas Vanbesien <tvanbesi@proton.me> | 2026-02-19 06:19:23 +0100 |
|---|---|---|
| committer | Thomas Vanbesien <tvanbesi@proton.me> | 2026-02-19 06:19:23 +0100 |
| commit | 2b632bd229edaa9999be5043f9a8ae2ac7d17e41 (patch) | |
| tree | 5071ef9fa36a898fbe009f477441fd2f34a4cb2d /readme.md | |
| parent | 37c0fee672afd3701ea3ed87958da4d548bf1be3 (diff) | |
| download | BobinkCOpcUa-2b632bd229edaa9999be5043f9a8ae2ac7d17e41.tar.gz BobinkCOpcUa-2b632bd229edaa9999be5043f9a8ae2ac7d17e41.zip | |
New optional CLI argument [nodes-config] lets the server populate its
address space from a dot-indexed config file (node.N.name/type/value/
accessLevel/description). Supports 10 scalar types plus 1D arrays.
Diffstat (limited to 'readme.md')
| -rw-r--r-- | readme.md | 66 |
1 files changed, 65 insertions, 1 deletions
@@ -59,7 +59,8 @@ build/bobink_opcua_discovery_server tests/secure_user/server_lds.conf # 2. Register Server (connects to the LDS on port 14840) build/bobink_opcua_server tests/secure_user/server_register.conf \ - tests/secure_user/server_register_client.conf opc.tcp://localhost:14840 + tests/secure_user/server_register_client.conf opc.tcp://localhost:14840 \ + [nodes.conf] # 3. Find registered servers via the LDS build/bobink_opcua_client tests/secure_user/client.conf find-servers opc.tcp://localhost:14840 @@ -123,3 +124,66 @@ Three authentication modes are supported via the `authMode` key: - **anonymous** — no user identity - **user** — username and password (requires `username` and `password` keys) - **cert** — X509 certificate identity token (reuses the application certificate; requires encryption to be configured) + +## Nodes Configuration + +`bobink_opcua_server` accepts an optional nodes config file that populates +the server's address space with variable nodes. Pass it as the fourth +positional argument (before the optional log level): + +```sh +build/bobink_opcua_server server.conf client.conf opc.tcp://localhost:14840 nodes.conf +``` + +The file uses the same `key = value` format with dot-indexed keys: + +``` +node.0.name = Temperature +node.0.description = Current temperature reading +node.0.type = double +node.0.value = 23.5 +node.0.accessLevel = read + +node.1.name = DeviceName +node.1.type = string +node.1.value = Sensor-01 +node.1.accessLevel = readwrite + +node.2.name = Measurements +node.2.description = Recent measurements +node.2.type = double[] +node.2.value = 1.5, 2.3, 3.7, 4.1 +node.2.accessLevel = read +``` + +Each node gets a string NodeId in namespace 1 (`ns=1;s=<name>`). The `name` +field is also used as the display name and browse name. + +### Fields + +| Field | Required | Description | +|-------|----------|-------------| +| `name` | yes | Display name, browse name, and string NodeId | +| `description` | no | Human-readable description | +| `type` | yes | Data type (see table below); append `[]` for a 1D array | +| `value` | yes | Initial value; comma-separated for arrays | +| `accessLevel` | yes | `read` or `readwrite` | + +### Supported Types + +| Type name | OPC UA type | +|-----------|-------------| +| `bool` | Boolean (`true` / `false`) | +| `int16` | Int16 | +| `uint16` | UInt16 | +| `int32` | Int32 | +| `uint32` | UInt32 | +| `int64` | Int64 | +| `uint64` | UInt64 | +| `float` | Float | +| `double` | Double | +| `string` | String | + +Append `[]` to any type name for a 1D array (e.g. `double[]`, `string[]`). +Array values are comma-separated. String values in arrays cannot contain +literal commas. |
