From 07d29a0b6c1d4f550fa8c69f6bbe20443f0bdec3 Mon Sep 17 00:00:00 2001 From: Thomas Vanbesien Date: Fri, 20 Feb 2026 13:28:27 +0100 Subject: Replace static node values with random updates every second MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the value field from nodes config — nodes are now created with zero-initialized values, then randomized at startup and every 1000ms via UA_Server_addRepeatedCallback. This is intended for testing OPC UA monitoring and subscriptions. --- readme.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'readme.md') diff --git a/readme.md b/readme.md index b334fb2..d13cec7 100644 --- a/readme.md +++ b/readme.md @@ -135,29 +135,32 @@ positional argument (before the optional log level): build/bobink_opcua_server server.conf client.conf opc.tcp://localhost:14840 nodes.conf ``` +The config file only declares the node structure (name, type, access level). +Values are not specified in the config — the server assigns random values at +startup and updates them every second. This is intended for testing OPC UA +monitoring and subscriptions. + 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=`). The `name` -field is also used as the display name and browse name. +field is also used as the display name and browse name. Array nodes are +created with 5 elements. ### Fields @@ -166,14 +169,13 @@ field is also used as the display name and browse name. | `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`) | +| `bool` | Boolean | | `int16` | Int16 | | `uint16` | UInt16 | | `int32` | Int32 | @@ -185,5 +187,3 @@ field is also used as the display name and browse name. | `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. -- cgit v1.2.3