API Docs for: 0.0.57
Show:

ExpandedNodeId Class

An ExpandedNodeId extends the NodeId structure.

An ExpandedNodeId extends the NodeId structure by allowing the NamespaceUri to be explicitly specified instead of using the NamespaceIndex. The NamespaceUri is optional. If it is specified then the NamespaceIndex inside the NodeId shall be ignored.

The ExpandedNodeId is encoded by first encoding a NodeId as described in Clause 5 .2.2.9 and then encoding NamespaceUri as a String.

An instance of an ExpandedNodeId may still use the NamespaceIndex instead of the NamespaceUri. In this case, the NamespaceUri is not encoded in the stream. The presence of the NamespaceUri in the stream is indicated by setting the NamespaceUri flag in the encoding format byte for the NodeId.

If the NamespaceUri is present then the encoder shall encode the NamespaceIndex as 0 in the stream when the NodeId portion is encoded. The unused NamespaceIndex is included in the stream for consistency,

An ExpandedNodeId may also have a ServerIndex which is encoded as a UInt32 after the NamespaceUri. The ServerIndex flag in the NodeId encoding byte indicates whether the ServerIndex is present in the stream. The ServerIndex is omitted if it is equal to zero.

Constructor

ExpandedNodeId

(
  • identifierType
  • value
  • namespace
  • namespaceUri
  • serverIndex
)

Parameters:

  • identifierType NodeIdType
    • the nodeID type
  • value Number | String | GUID | Buffer
    • the node id value. The type of Value depends on identifierType.
  • namespace Number
    • the index of the related namespace (optional , default value = 0 )
  • namespaceUri String | Null
    • NamespaceUri
  • serverIndex UInteger32 | Null
    • the server Index

Methods

add_dataItem_stuff

(
  • variable
  • options
)
private

Provided by the opcua.client module.

Defined in lib\data_access\UADataItem.js:41

Parameters:

  • variable Object
  • options Object
    • definition

      [Optional]

    • valuePrecision

      [Optional]

    • modellingRule

      [Optional]

addAnalogDataItem AnalogDataItem DataItems that represent continuously-variable physical quantities ( e.g., length, temperature) , in contrast to the digital representation of data in discrete items NOTE Typical examples are the values provided by temperature sensors or pressure sensors. OPC UA defines a specific UAVariableType to identify an AnalogItem. Properties describe the possible ranges of AnalogItems.

(
  • options
)
UAVariable

Parameters:

  • options Object
    • browseName String
    • definition String
    • [valuePrecision=null] Double | Null optional
    • instrumentRange
      • low Double
      • high Double
    • engineeringUnitsRange.low Double
    • engineeringUnitsRange.high Double
    • engineeringUnits String
    • dataType NodeId

      // todo :check

    • [accessLevel= "CurrentRead | CurrentWrite"] AccessLevelFlag optional
    • [userAccessLevel= "CurrentRead | CurrentWrite"] AccessLevelFlag optional
    • value
    • [modellingRule] optional

Returns:

Example:

:

addressSpace.add_analog_dataItem({ componentOf: parentObject, browseName: "TemperatureSensor", definition: "(tempA -25) + tempB", valuePrecision: 0.5, //- instrumentRange: { low: 100 , high: 200}, // optional engineeringUnitsRange: { low: 100 , high: 200}, // mandatory engineeringUnits: standardUnits.degree_celsius,, // optional // access level accessLevel: 1 minimumSamplingInterval: 10, });

addDataItem

(
  • options
)
UAVariable

Parameters:

  • options Object
    • browseName String
    • definition String
    • [valuePrecision=null] Double | Null optional
    • dataType NodeId

      // todo :check

    • value
    • componentOf

Returns:

addMultiStateDiscrete

(
  • options
)
Object | UAVariable

Parameters:

  • options Object
    • browseName String
    • [nodeId] NodeId optional
    • [value= 0] UInt32 optional
    • enumStrings String

      an array containing the String associated with each enumeration value, starting from 0 onward

Returns:

Object | UAVariable:

addMultiStateValueDiscrete

(
  • options
  • [options.value
)
Object | UAVariable

Parameters:

  • options Object
  • [options.value UInt32

    = 0 }

Returns:

Object | UAVariable:

Example:

 addressSpace.addMultiStateValueDiscrete({
      componentOf:parentObj,
      browseName: "myVar",
      enumValues: {
          "Red":    0xFF0000,
          "Green":  0x00FF00,
          "Blue":   0x0000FF
      }
  });
  addMultiStateValueDiscrete(parentObj,{
      browseName: "myVar",
      enumValues: [
          {
             value: 0xFF0000,
             displayName: "Red",
             description: " The color Red"
          },
          {
             value: 0x00FF000,
             displayName: "Green",
             description: " The color Green"
          },
          {
             value: 0x0000FF,
             displayName: "Blue",
             description: " The color Blue"
          }
     ]
  });

addTwoStateDiscrete

(
  • options
  • [options.value
  • [options.trueState
  • [options.falseState
)
Object | UAVariable

Parameters:

  • options Object
    • browseName String
    • [nodeId] NodeId optional
  • [options.value Boolean

    }

  • [options.trueState String

    = "ON" }

  • [options.falseState String

    = "OFF" }

Returns:

Object | UAVariable:

addYArrayItem

(
  • options
)

Parameters:

  • options Object
    • componentOf NodeId
    • browseName String
    • title String
    • [instrumentRange] optional
      • [low] Double optional
      • [high] Double optional
    • engineeringUnitsRange.low Double
    • engineeringUnitsRange.high Double
    • engineeringUnits String
    • [nodeId] NodeId optional
    • accessLevel
    • userAccessLevel
    • title String
    • axisScaleType AxisScaleEnumeration
    • xAxisDefinition AxisInformation
      • engineeringUnits EURange
      • range
      • range.low
      • range.high
      • title LocalizedText
      • axisScaleType AxisScaleEnumeration
      • axisSteps Array
        =
    • value

convertNodeIdToDataTypeAsync

(
  • session
  • dataTypeId
  • callback
)

Provided by the opcua.client module.

Defined in lib\client\proxy.js:47

Parameters:

Example:

 var dataTypeId  ="ns=0;i=11"; // Double
 convertNodeIdToDataTypeAsync(session,dataTypeId,function(err,dataType) {
     assert(!err && dataType === DataType.Double);
 });

 var dataTypeId  ="ns=0;i=290"; // Duration => SubTypeOf Double
 convertNodeIdToDataTypeAsync(session,dataTypeId,function(err,dataType) {
     assert(!err && dataType === DataType.Double);
 });

see also AddressSpace#findCorrespondingBasicDataType

isEmpty

() Boolean

Returns:

Boolean: true if the NodeId is null or empty

makeExpandedNodeId

(
  • value
  • [namespace=0]
)
ExpandedNodeId

Parameters:

Returns:

readValue

(
  • callback
)

Provided by the opcua.client module.

Defined in lib\client\proxy.js:193

get a updated Value of the Variable , by using a ReadRequest

Parameters:

  • callback Function

toJSON

() String

Inherited from NodeId but overwritten in lib\datamodel\expanded_nodeid.js:73

convert nodeId to a JSON string. same as {@link NodeId#toString }

Returns:

String:

toString

() String

Inherited from NodeId but overwritten in lib\datamodel\expanded_nodeid.js:56

Returns:

String:

writeValue

(
  • dataValue
  • callback
)

Provided by the opcua.client module.

Defined in lib\client\proxy.js:223

set the Value of the Variable, by using a WriteRequest

Parameters:

  • dataValue DataValue
  • callback Function
    • err Error | Null

Properties

$components

Array

Provided by the opcua.client module.

Defined in lib\client\proxy.js:142

the object's components

$methods

Array

Provided by the opcua.client module.

Defined in lib\client\proxy.js:156

the object's properties

$organizes

Array

Provided by the opcua.client module.

Defined in lib\client\proxy.js:163

the Folder's elements

$properties

Array

Provided by the opcua.client module.

Defined in lib\client\proxy.js:149

the object's properties

browseName

String

Provided by the opcua.client module.

Defined in lib\client\proxy.js:176

the object's browseName

description

String

Provided by the opcua.client module.

Defined in lib\client\proxy.js:170

the object's description

identifierType

NodeIdType

namespace

Number

nodeClass

NodeClass

Provided by the opcua.client module.

Defined in lib\client\proxy.js:182

the object's NodeClass

nodeId

NodeId

Provided by the opcua.client module.

Defined in lib\client\proxy.js:129

the object nodeId

value