Documentation

Variable extends BaseNode
in package

Table of Contents

Properties

$nodeClass  : string
$browseName  : string
$dataType  : string
$description  : string
$displayName  : string
$nodeId  : string
$value  : string

Methods

__construct()  : mixed
Variables hold a value along with metadata such as timestamps and status.
toArray()  : array<string|int, mixed>
Converts the node and its attributes to an associative array.

Properties

$browseName

protected string $browseName

$description

protected string $description = ''

$displayName

protected string $displayName

Methods

__construct()

Variables hold a value along with metadata such as timestamps and status.

public __construct(string $nodeId, string $browseName, string $displayName, string $dataType[, string $description = '' ][, string $value = '' ][, string $nodeClass = 'variable' ]) : mixed

In OPC UA, the Variable NodeClass (see OPC UA Part 3, Section 5.6.2) defines the following key attributes:

  • Value: The current value held by the Variable.
  • DataType: The NodeId of the DataType that defines the type of the variable’s value.
  • ValueRank: An integer indicating whether the value is scalar (-1) or an array, and if an array, the number of dimensions.
  • ArrayDimensions: (Optional) An array specifying the length of each dimension if the value is an array.
  • AccessLevel: A bitmask indicating the access rights for the Variable (e.g. read and/or write).
  • UserAccessLevel: Similar to AccessLevel but taking user permissions into account.
  • MinimumSamplingInterval: Indicates how often the value is updated by the server (in milliseconds).
  • Historizing: A boolean flag indicating if the server is recording historical data for this Variable.
Parameters
$nodeId : string
  • Unique identifier for the Variable node.
$browseName : string
  • The non-localized BrowseName used for OPC UA navigation.
$displayName : string
  • The localized name to display to users.
$dataType : string
  • The NodeId of the DataType for the variable's value.
$description : string = ''
  • Optional description of the variable.
$value : string = ''
  • The current or default value of the variable.
$nodeClass : string = 'variable'
  • The OPC UA NodeClass (e.g., "Object", "Variable").
Tags
see
https://reference.opcfoundation.org/Core/Part3/v104/docs/5.6.2

OPC UA Variable NodeClass

For the purposes of compatibility with the OPC UA Web API we have left out the following attributes:

  • ValueRank
  • ArrayDimensions
  • AccessLevel
  • UserAccessLevel
  • MinimumSamplingInterval
  • Historizing

We are currently supporting the following:

toArray()

Converts the node and its attributes to an associative array.

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

The node represented as an associative array.


        
On this page

Search results