Skip to content

CSV Example: OPC-UA

Below is an example CSV file for an OPC-UA device:

name description units valueType readWrite nodeId.identifier nodeId.identifierType nodeId.namespaceIndex dataTypeId.identifier dataTypeId.identifierType dataTypeId.namespaceIndex nodeAttribute
Atribute1 Description1 Unit1 Uint16 R 1 NUMERIC 1 1 NUMERIC 1 value
Attribute2 Description2 Unit2 Uint16 R 2 NUMERIC 2 2 NUMERIC 2 value
Attribute3 Description3 Unit3 Uint16 R 3 NUMERIC 3 3 NUMERIC 3 value

The columns are defined by the protocol attributes, with a new device resource on each row:

name,description,isHidden,units,valueType,readWrite,nodeId.identifier,nodeId.identifierType,nodeId.namespaceIndex,dataTypeId.identifier,dataTypeId.identifierType,dataTypeId.namespaceIndex,nodeAttribute
Attribute1,Description1,bool,Unit1,Uint16,R,1,NUMERIC,1,1,NUMERIC,1,value
Attribute2,Description2,bool,Uint16,W,2,NUMERIC,2,2,NUMERIC,2,value
Attribute3,Description3,bool,Uint16,RW,3,NUMERIC,3,3,NUMERIC,3,value

name is a mandatory attribute.

Note

Any attribute that does not belong to the device resource property will be treated as a device resource attribute. These are attributes specific to the protocol. In the case of OPC-UA and in this example above, these are nodeId, dataTypeId, and nodeAttribute.

Optional items such as OPC-UA browse path attributes can also be added to the csv file. For example:

browseStartNodeId.identifier,browseStartNodeId.identifierType,browseStartNodeId.namespaceIndex,browsePath,browsePathNamespaceIndex

You can find further information about attributes for OPC-UA devices, see the Edge Xpert and Edge XRT documentation.