Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UATwoStateVariable

Hierarchy

Implements

Constructors

Properties

Methods

Constructors

constructor

Properties

Optional $$dataType

$$dataType: any

$$extensionObjectArray

$$extensionObjectArray: any

$$getElementBrowseName

$$getElementBrowseName: any

$$indexPropertyName

$$indexPropertyName: any

Optional $$variableType

$$variableType: any

Optional $extensionObject

$extensionObject: any

Optional $historicalDataConfiguration

$historicalDataConfiguration: HistoricalDataConfiguration

Optional __waiting_callbacks

__waiting_callbacks: any[]

_dataValue

_dataValue: DataValue
internal

_get_func

_get_func: any

_permissions

_permissions: Permissions | null

_set_func

_set_func: any

_timestamped_get_func

_timestamped_get_func: any

_timestamped_set_func

_timestamped_set_func: 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}}

Readonly addressSpace

addressSpace: AddressSpace

arrayDimensions

arrayDimensions: UInt32[] | null

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

Readonly description

description: LocalizedText

Readonly displayName

displayName: LocalizedText[]

Optional Readonly effectiveDisplayName

effectiveDisplayName: UAVariableT<LocalizedText, LocalizedText>

effective display name

contains a human readable name for the current state of the state machine after taking the state of any SubStateMachines in account. There is no rule specified for which state or sub-state should be used. It is up to the Server and will depend on the semantics of the StateMachineType

Optional Readonly effectiveTransitionTime

effectiveTransitionTime: UAVariableT<Date, DateTime>

Optional Readonly falseState

falseState: UAVariableT<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.

Readonly id

id: UAVariableT<boolean, Boolean>

Readonly isFalseSubStateOf

  • Returns UAStateVariable

Readonly isTrueSubStateOf

  • Returns UAStateVariable

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.

Optional Readonly modellingRule

modellingRule: ModellingRuleType

Optional Readonly name

name: UAVariableT<QualifiedName, QualifiedName>

Readonly namespace

namespace: Namespace

Readonly namespaceIndex

namespaceIndex: number

Readonly 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.

Optional Readonly number

number: UAVariableT<number, UInt32>

number is an integer which uniquely identifies the current state within the StateMachineType

Optional onFirstBrowseAction

onFirstBrowseAction: function

Type declaration

    • (this: BaseNode): Promise<void>
    • Parameters

      • this: BaseNode

      Returns Promise<void>

Readonly parent

parent: BaseNode | null

Optional Readonly parentNodeId

parentNodeId: NodeId

Optional refreshFunc

refreshFunc: function

Type declaration

Readonly semantic_version

semantic_version: number

Optional Readonly transitionTime

transitionTime: UAVariableT<Date, DateTime>

Optional Readonly trueState

trueState: UAVariableT<LocalizedText, LocalizedText>

typeDefinition

typeDefinition: NodeId

typeDefinitionObj

typeDefinitionObj: UAVariableType

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.

Optional varHistorian

varHistorian: IVariableHistorian

Methods

_conditionRefresh

  • _conditionRefresh(_cache?: any): void
  • Parameters

    • Optional _cache: any

    Returns void

_getEnumerationInfo

_historyPush

  • _historyPush(newDataValue: DataValue): any
  • Parameters

    • newDataValue: DataValue

    Returns any

_historyRead

  • _historyRead(context: SessionContext, historyReadDetails: ReadRawModifiedDetails | ReadEventDetails | ReadProcessedDetails | ReadAtTimeDetails, indexRange: NumericRange | null, dataEncoding: QualifiedNameLike | null, continuationPoint: ContinuationPoint | null, callback: CallbackT<HistoryReadResult>): any
  • Parameters

    Returns any

_historyReadModify

_historyReadRaw

_historyReadRawAsync

  • _historyReadRawAsync(historyReadRawModifiedDetails: ReadRawModifiedDetails, maxNumberToExtract: number, isReversed: boolean, reverseDataValue: boolean, callback: CallbackT<DataValue[]>): any
  • Parameters

    • historyReadRawModifiedDetails: ReadRawModifiedDetails
    • maxNumberToExtract: number
    • isReversed: boolean
    • reverseDataValue: boolean
    • callback: CallbackT<DataValue[]>

    Returns any

_historyReadRawModify

_internal_set_dataValue

  • _internal_set_dataValue(dataValue: DataValue, indexRange?: NumericRange | null): void
  • Parameters

    • dataValue: DataValue
    • Optional indexRange: NumericRange | null

    Returns void

_postInitialize

  • _postInitialize(): void
  • Returns void

_update_startOfArchive

  • _update_startOfArchive(newDate: Date): void

_update_startOfOnlineArchive

  • _update_startOfOnlineArchive(newDate: Date): void

_validate_DataType

  • _validate_DataType(variantDataType: DataType): boolean

addListener

  • addListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

addReference

adjustVariant

  • adjustVariant(variant: Variant): Variant
  • Parameters

    • variant: Variant

    Returns Variant

allReferences

asyncRefresh

bindExtensionObject

  • bindExtensionObject(optionalExtensionObject?: ExtensionObject): ExtensionObject | null

bindVariable

browseNode

  • browseNode(browseDescription: BrowseDescriptionOptions, session?: SessionContext): ReferenceDescription[]
  • browse the node to extract information requested in browseDescription

    method

    browseNode

    Parameters

    • browseDescription: BrowseDescriptionOptions
    • Optional session: SessionContext

    Returns ReferenceDescription[]

checkExtensionObjectIsCorrect

  • checkExtensionObjectIsCorrect(extObj: ExtensionObject | ExtensionObject[] | null): boolean
  • Parameters

    • extObj: ExtensionObject | ExtensionObject[] | null

    Returns boolean

checkVariantCompatibility

  • checkVariantCompatibility(value: Variant): StatusCode
  • method

    checkVariantCompatibility note: this method is overridden in address-space-data-access

    Parameters

    • value: Variant

    Returns StatusCode

clone

  • clone(options?: any, optionalFilter?: any, extraInfo?: any): UAVariable
  • Parameters

    • Optional options: any
    • Optional optionalFilter: any
    • Optional extraInfo: any

    Returns UAVariable

constructExtensionObjectFromComponents

  • constructExtensionObjectFromComponents(): any

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

eventNames

  • eventNames(): Array<string | symbol>

findReference

  • findReference(strReference: string, isForward?: boolean): UAReference | null

findReferences

  • findReferences(referenceType: string | NodeId | UAReferenceType, isForward?: boolean): UAReference[]

findReferencesAsObject

  • findReferencesAsObject(strReference: string, isForward: boolean): BaseNode[]

findReferencesEx

findReferencesExAsObject

  • findReferencesExAsObject(strReference: string, browseDirection?: BrowseDirection): 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

getAggregates

  • getAggregates(): BaseNode[]

getChildByName

  • getChildByName(browseName: string | QualifiedName): BaseNode | null

getComponentByName

  • getComponentByName(componentName: QualifiedNameLike, namespaceIndex?: number): UAObject | UAVariable | null

getComponents

  • getComponents(): BaseNode[]

getDataTypeNode

getEventSourceOfs

  • getEventSourceOfs(): BaseNode[]

getEventSources

  • getEventSources(): BaseNode[]

getFalseState

  • getFalseState(): LocalizedText
  • Returns LocalizedText

getFalseSubStates

  • Returns UAStateVariable[]

getMaxListeners

  • getMaxListeners(): number

getNotifiers

  • getNotifiers(): BaseNode[]

getProperties

  • getProperties(): BaseNode[]

getPropertyByName

  • getPropertyByName(browseName: string, namespaceIndex?: number): UAVariable | null

getTrueState

  • getTrueState(): LocalizedText
  • Returns LocalizedText

getTrueSubStates

  • Returns UAStateVariable[]

getUserWriteMask

  • getUserWriteMask(): number

getValue

  • getValue(): boolean
  • method

    getValue

    Returns boolean

getValueAsString

  • getValueAsString(): string
  • method

    getValueAsString

    Returns string

getWriteMask

  • getWriteMask(): number
  • Returns number

handle_semantic_changed

  • handle_semantic_changed(): void

historyRead

incrementExtensionObjectPartial

  • incrementExtensionObjectPartial(path: any): void

initialize

install_extra_properties

  • install_extra_properties(): void

isEnumeration

  • isEnumeration(): boolean

isExtensionObject

  • isExtensionObject(): boolean

isReadable

isUserReadable

isUserWritable

isWritable

listenerCount

  • listenerCount(event: string | symbol): number

listeners

  • listeners(event: string | symbol): Function[]

off

  • off(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

on

  • on(eventName: "semantic_changed", eventHandler: function): this
  • on(eventName: "value_changed", eventHandler: function): this
  • Parameters

    • eventName: "semantic_changed"
    • eventHandler: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • eventName: "value_changed"
    • eventHandler: function
        • (dataValue: DataValue): void
        • Parameters

          • dataValue: DataValue

          Returns void

    Returns this

once

  • once(eventName: "semantic_changed", eventHandler: function): this
  • once(eventName: "value_changed", eventHandler: function): this
  • Parameters

    • eventName: "semantic_changed"
    • eventHandler: function
        • (): void
        • Returns void

    Returns this

  • Parameters

    • eventName: "value_changed"
    • eventHandler: function
        • (dataValue: DataValue): void
        • Parameters

          • dataValue: DataValue

          Returns void

    Returns this

prependListener

  • prependListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

propagate_back_references

  • propagate_back_references(): void

rawListeners

  • rawListeners(event: string | symbol): Function[]

readAttribute

readEnumValue

readValue

readValueAsync

removeAllListeners

  • removeAllListeners(event?: string | symbol): this

removeListener

  • removeListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

removeReference

setMaxListeners

  • setMaxListeners(n: number): this

setPermissions

setValue

  • setValue(boolValue: boolean): void
  • method

    setValue

    Parameters

    • boolValue: boolean

    Returns void

setValueFromSource

  • setValueFromSource(value: VariantLike, statusCode?: StatusCode, sourceTimestamp?: Date): void

toString

  • toString(): string
  • Returns string

touchValue

  • touchValue(updateNow?: PreciseClock): void

updateExtensionObjectPartial

  • updateExtensionObjectPartial(partialExtensionObject: any): any

writeAttribute

  • write a variable attribute (callback version)

    Parameters

    • context: SessionContext
    • 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: SessionContext
    • 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

writeValue

  • writeValue(context: SessionContext, dataValue: DataValueOptionsT<LocalizedText, LocalizedText>, indexRange: NumericRange | null, callback: function): void
  • writeValue(context: SessionContext, dataValue: DataValueOptionsT<LocalizedText, LocalizedText>, callback: function): void
  • writeValue(context: SessionContext, dataValue: DataValueOptionsT<LocalizedText, LocalizedText>, indexRange?: NumericRange | null): Promise<StatusCode>
  • Parameters

    • context: SessionContext
    • dataValue: DataValueOptionsT<LocalizedText, LocalizedText>
    • indexRange: NumericRange | null
    • callback: function
        • (err: Error | null, statusCode?: StatusCode): void
        • Parameters

          • err: Error | null
          • Optional statusCode: StatusCode

          Returns void

    Returns void

  • Parameters

    • context: SessionContext
    • dataValue: DataValueOptionsT<LocalizedText, LocalizedText>
    • callback: function
        • (err: Error | null, statusCode?: StatusCode): void
        • Parameters

          • err: Error | null
          • Optional statusCode: StatusCode

          Returns void

    Returns void

  • Parameters

    • context: SessionContext
    • dataValue: DataValueOptionsT<LocalizedText, LocalizedText>
    • Optional indexRange: NumericRange | null

    Returns Promise<StatusCode>

Generated using TypeDoc