Options
All
  • Public
  • Public/Protected
  • All
Menu

  subscribe now with sterfive to access the online-user manual

Type parameters

Hierarchy

  • Omit<UAStateVariable<T>, "id" | "number">
    • UAProgramStateMachine_currentState

Index

Properties

Optional $extensionObject

$extensionObject: any

accessLevel

accessLevel: number

The AccessLevel Attribute is used to indicate how the Value of a Variable can be accessed (read/write) and if it contains current and/or historic data.

The AccessLevel does not take any user access rights into account, i.e. although the Variable is writable this may be restricted to a certain user / user group.

The {{link:AccessLevelType}}

accessRestrictions

accessRestrictions: AccessRestrictionsFlag

addressSpace

addressSpace: IAddressSpace

arrayDimensions

arrayDimensions: number[]

This Attribute specifies the length of each dimension for an array value.

  • The Attribute is intended to describe the capability of the Variable, not the current size.
  • The number of elements shall be equal to the value of the valueRank Attribute.
  • Shall be null if valueRank <=0.
  • A value of 0 for an individual dimension indicates that the dimension has a variable length.

example

For example, if a Variable is defined by the following javascript array with 346 Int32 elements:

const myArray = new Array(346).fill(0);

then:

  • DataType would point to an Int32
  • the Variable's valueRank has the value 1 and,
  • the arrayDimensions is an array with one entry having the value 346.
{
  dataType: "Int32",
  valueRank: 1,
  arrayDimensions: [346]
}

Note: the maximum length of an array transferred on the wire is 2147483647 (max Int32) and a multidimensional array is encoded as a one dimensional array.

Readonly browseName

browseName: QualifiedName

dataType

dataType: NodeId

Readonly dataTypeObj

dataTypeObj: UADataType

description

description: LocalizedText

displayName

displayName: LocalizedText[]

Optional effectiveDisplayName

effectiveDisplayName: UAProperty<LocalizedText, LocalizedText>

historizing

historizing: boolean

The historizing attribute indicates whether the server is actively collecting data for the history of the variable.

This differs from the accessLevel Attribute which identifies if the variable has any historical data.

A value of true indicates that the server is actively collecting data.

A value of false indicates the server is not actively collecting data.

Default value is false.

id

minimumSamplingInterval

minimumSamplingInterval: number

The MinimumSamplingInterval Attribute indicates how 'current' the Value of the Variable will be kept.

It specifies (in milliseconds) how fast the Server can reasonably sample the value for changes (see Part 4 for a detailed description of sampling interval).

A MinimumSamplingInterval of 0 indicates that the Server is to monitor the item continuously.

A MinimumSamplingInterval of -1 means indeterminate.

modellingRule

modellingRule: ModellingRuleType

Optional name

namespace

namespace: INamespace

namespaceIndex

namespaceIndex: number

namespaceUri

namespaceUri: string

Readonly nodeClass

nodeClass: Variable

Readonly nodeId

nodeId: NodeId

Optional nodeVersion

nodeVersion: UAVariableT<string, String>

NodeVersion (Optional) String The NodeVersion Property is used to indicate the version of a Node. The NodeVersion Property is updated each time a Reference is added or deleted to the Node the Property belongs to. Attribute value changes do not cause the NodeVersion to change. Clients may read the NodeVersion Property or subscribe to it to determine when the structure of a Node has changed.

number

number: UAProperty<number, UInt32>

Optional onFirstBrowseAction

onFirstBrowseAction: () => Promise<void>

Type declaration

    • (): Promise<void>
    • Returns Promise<void>

Readonly parent

parent: BaseNode

parentNodeId

parentNodeId: NodeId

rolePermissions

rolePermissions: RolePermissionType[]

semantic_version

semantic_version: number

typeDefinition

typeDefinition: NodeId

typeDefinitionObj

typeDefinitionObj: UAVariableType

Optional userAccessLevel

userAccessLevel: number

The UserAccessLevel Attribute is used to indicate how the Value of a Variable can be accessed (read/write) and if it contains current or historic data taking user access rights into account.

The AccessLevelType is defined in 8.57.

valueRank

valueRank: number

This Attribute indicates whether the Value Attribute of the Variable is an array and how many dimensions the array has. It may have the following values:

  • n > 1 : the Value is an array with the specified number of dimensions.
  • OneDimension (1): The value is an array with one dimension.
  • OneOrMoreDimensions (0): The value is an array with one or more dimensions.
  • Scalar (-1): The value is not an array.
  • Any (-2): The value can be a scalar or an array with any number of dimensions.
  • ScalarOrOneDimension (-3): The value can be a scalar or a one dimensional array.

NOTE:

  • All DataTypes are considered to be scalar, even if they have array-like semantics like ByteString and String.

Methods

addReference

  • Parameters

    Returns void

allReferences

  • Returns UAReference[]

asyncRefresh

  • Parameters

    Returns void

  • Parameters

    • oldestDate: Date

    Returns Promise<DataValue>

bindExtensionObject

bindVariable

  • Parameters

    Returns void

browseNode

browseNodeByTargetName

  • Parameters

    Returns NodeId[]

clone

findReference

  • find the the references that are strictly of type reference.

    The isForward boolean flag specifies the direction of the references to be looked for.

    Forward direction is implied if omitted.

    • will throw an exception if more than one reference exists with the referenceType.
    • will return null if no reference exists.

    Parameters

    Returns UAReference

findReferences

  • find all the references that are strictly of type reference. The isForward boolean flag specifies the direction of the references to be looked for.

    Forward direction is implied if omitted.

    Parameters

    Returns UAReference[]

findReferencesAsObject

  • find all the nodes that are referenced by references strictly of type reference.

    The isForward boolean flag specifies the direction of the references to be looked for.

    Forward direction is implied if omitted.

    • will throw an exception if more than one reference exists with the referenceType.
    • will return null if no reference exists.

    Parameters

    Returns BaseNode[]

findReferencesEx

  • find all the references that are of type reference or a sub type of reference, in the direction specified by browseDirection

    • BrowseDirection.Forward direction is implied if browseDirection flags is omitted.

    Parameters

    Returns UAReference[]

findReferencesExAsObject

  • find all the nodes that are referenced by references of type reference or a sub type of reference, in the direction specified by browseDirection

    • BrowseDirection.Forward direction is implied if browseDirection flags is omitted.

    Parameters

    Returns BaseNode[]

fullName

  • fullName(): string
  • return a complete name of this object by pre-pending name of its parent(s) to its own name

    Returns string

getAccessRestrictions

  • get effective accessRestrictions if (inherited is true) and node has no accessRestrictions, then default accessRestriction from namespace is returned if (inherited is false) and node has no accessRestrictions, then AccessRestrictionsFlag.None is returned

    Parameters

    • inherited: boolean

    Returns AccessRestrictionsFlag

getAggregates

  • Returns BaseNode[]

getChildByName

  • Parameters

    Returns BaseNode

  • Parameters

    • browseName: string
    • Optional namespaceIndex: number

    Returns BaseNode

getComponentByName

  • Parameters

    Returns UAObject | UAVariable

  • Parameters

    • componentName: string
    • Optional namespaceIndex: number

    Returns UAObject | UAVariable

getComponents

  • Returns BaseNode[]

getDisplayName

  • getDisplayName(locale?: string): string
  • Parameters

    • Optional locale: string

      the locale of the text to return (e.g. en-EN)

    Returns string

getEventSourceOfs

  • return a array of the objects for which this node is an EventSource nodes = HasEventSource => self

    Returns BaseNode[]

getEventSources

  • return a array with the event source of this object. self = HasEventSource => nodes

    Returns BaseNode[]

getNotifiers

  • Returns BaseNode[]

getProperties

  • Returns BaseNode[]

getPropertyByName

  • Parameters

    Returns UAVariable

  • Parameters

    • propertyName: string
    • Optional namespaceIndex: number

    Returns UAVariable

getRolePermissions

  • Parameters

    • inherited: boolean

    Returns RolePermissionType[]

historyRead

installExtensionObjectVariables

  • installExtensionObjectVariables(): void
  • Returns void

install_extra_properties

  • install_extra_properties(): void
  • private

    Returns void

isEnumeration

  • isEnumeration(): boolean
  • Returns boolean

isExtensionObject

  • isExtensionObject(): boolean
  • Returns boolean

isReadable

  • returns true if the accessLevel flag allows the variable to be readable in the specified context.

    Parameters

    Returns boolean

isUserReadable

  • returns true if the userAccessLevel flag allows the variable to be readable in the specified context.

    Parameters

    Returns boolean

isUserWritable

  • returns true if the userAccessLevel flag allows the variable to be writeable in the specified context.

    Parameters

    Returns boolean

isWritable

  • returns true if the accessLevel flag allows the variable to be writeable in the specified context.

    Parameters

    Returns boolean

on

  • Parameters

    • eventName: "semantic_changed"
    • eventHandler: () => void
        • (): void
        • Returns void

    Returns UAStateVariable<T>

  • Parameters

    • eventName: "value_changed"
    • eventHandler: (dataValue: DataValue) => void

    Returns UAStateVariable<T>

once

  • Parameters

    • eventName: "semantic_changed"
    • eventHandler: () => void
        • (): void
        • Returns void

    Returns UAStateVariable<T>

  • Parameters

    • eventName: "value_changed"
    • eventHandler: (dataValue: DataValue) => void

    Returns UAStateVariable<T>

readAttribute

readEnumValue

  • Returns EnumValue2

readValue

readValueAsync

removeReference

  • Parameters

    Returns void

setAccessRestrictions

  • setAccessRestriction

    Parameters

    Returns void

setRolePermissions

  • Parameters

    Returns void

setValueFromSource

  • Parameters

    Returns void

touchValue

  • Parameters

    Returns void

writeAttribute

  • write a variable attribute (callback version)

    Parameters

    • context: ISessionContext
    • writeValue: WriteValueOptions
    • callback: StatusCodeCallback

      example

        const writeValue = {
           attributeId: AttributeIds.Value,
           dataValue: new DataValue({
               statusCode: StatusCodes.Good,
               sourceTimestamp: new Date(),
               value: new Variant({ dataType: DataType.Double, value: 3.14 })
           }),
           nodeId
        };
      myVariable.writeAttribute(context,writeValue,(err, statusCode) => {
         if (err) { console.log("Write has failed"); return; }
         console.log("write statusCode = ",statusCode.toString());
      });
      

    Returns void

  • write a variable attribute (async/await version)

    Parameters

    • context: ISessionContext
    • writeValue: WriteValueOptions

      example

      try {
         const writeValue = {
            attributeId: AttributeIds.Value,
            dataValue: new DataValue({
                statusCode: StatusCodes.Good,
                sourceTimestamp: new Date(),
                value: new Variant({ dataType: DataType.Double, value: 3.14 })
            }),
            nodeId
         };
         const statusCode = await myVariable.writeAttribute(context,writeValue);
      } catch(err) {
        console.log("Write has failed");
        return;
      }
      console.log("write statusCode = ", statusCode.toString());
      

    Returns Promise<StatusCode>

writeEnumValue

  • writeEnumValue(value: string | number): void
  • precondition

    UAVariable must have a dataType deriving from "Enumeration"

    Parameters

    • value: string | number

    Returns void

writeValue

Generated using TypeDoc