Details of Capabilities
In both reading and writing (GET and SET), tags are addressed using OPC-UA XML Syntax:
- String NodeID form:
"ns=4;s=Foo.Bar.Baz"
- IntegerNodeID form:
"ns=34;i=11902"
If ns is omitted, namespace 0 is assumed: "s=Foo.Bar.Baz"
The value will be returned as a JSON string of the form:
{"val":<data>, "type":<typename>}
Only numeric and the STRING and DATE_TIME types are returned currently. Other data types are not supported and the value will be “UNKNOWN”.
The supported types are:
- float
- double
- bool
- byte
- sbyte
- int16
- uint16
- int32
- uint32
- int64
- uint64
- string
- datetime
To be compatible with JSON style SET node refs (described below) the GET method will accept node refs starting with “/json?”. So the two node refs /json?ns=4;i=1900
and ns=4;i=1900
are equivalent.
The supported types in flat JSON and their corresponding versions in the OPC-UA specification are as follows:
Flat JSON | OPC-UA |
---|---|
bool | boolean |
int8 | sbyte |
int16 | int16 |
int32 | int32 |
int64 | int64 |
uint8 | byte |
uint16 | uint16 |
uint32 | uint32 |
uint64 | uint64 |
float | float |
double | double |
string | string |
datetime | datetime |