OpcMemberSwitch Members

Namespace: Opc.UaFx
Assemblies: Opc.UaFx.Advanced.dll, Opc.UaFx.Advanced.dll
The OpcMemberSwitch type exposes the following members.

OpcMemberSwitch(Int32)

Initializes a new instance of the OpcMemberSwitch class which refers to the bit specified. Using this constructor results in a OpcMemberSwitch which evaluates to the value true in case there the bit referenced is set (= high) in the 'EncodingMask'.

C#

public OpcMemberSwitch(int bit)


Parameters

bit Int32

The zero-based number of the bit in the 'EncodingMask' which controls the existence of an optional member. The value needs to be between 0 and 63 (inclusive).


Exceptions

ArgumentOutOfRangeException

The bit is less than 0 or greater than 63.


Remarks

This constructor uses the OpcMemberSwitchConditionsBit for the Conditions property.

OpcMemberSwitch(String)

Initializes a new instance of the OpcMemberSwitch class which refers to the switch member using its name specified. Using this constructor results in a OpcMemberSwitch which evaluates to the value true in case there the value of the switch member referenced by the name is not equals zero.

C#

public OpcMemberSwitch(string name)


Parameters

name String

The name of the switch member its value is compared to control the existence of an optional member.


Exceptions

ArgumentException

The name is equals Empty.

ArgumentNullException

The name is a null reference (Nothing in Visual Basic).


Remarks

This constructor uses the OpcMemberSwitchConditionsField for the Conditions property.

OpcMemberSwitch(String, Int64)

Initializes a new instance of the OpcMemberSwitch class which refers to the switch member using its name while its value needs to be equals to the value specified. Using this constructor results in a OpcMemberSwitch which evaluates to the value true in case there the value of the switch member referenced by the name is equals to the value.

C#

public OpcMemberSwitch(string name, long value)


Parameters

name String

The name of the switch member its value is compared to the value to control the existence of an optional member.

value Int64

The value towards the value of the switch member is to be compared using the OpcMemberSwitchOperatorEquals. The value needs to be between MinValue and MaxValue.


Exceptions

ArgumentException

The name is equals Empty.

ArgumentNullException

The name is a null reference (Nothing in Visual Basic).

ArgumentOutOfRangeException

The value is less than MinValue or greater than MaxValue.


Remarks

This constructor uses the OpcMemberSwitchConditionsField and Value for the Conditions property.

OpcMemberSwitch(String, Int64, OpcMemberSwitchOperator)

Initializes a new instance of the OpcMemberSwitch class which refers to the switch member using its name while its values is compared to the value using the operator specified. Using this constructor results in a OpcMemberSwitch which evaluates to the value true in case there the comparison of value of the switch member referenced by the name using the operator and the value results to the value true.

C#

public OpcMemberSwitch(string name, long value, OpcMemberSwitchOperator operator)


Parameters

name String

The name of the switch member its value is compared to the value to control the existence of an optional member.

value Int64

The value towards the value of the switch member is to be compared using the operator specified. The value needs to be between MinValue and MaxValue.

operator OpcMemberSwitchOperator

One of the members defined by the OpcMemberSwitchOperator enumeration which defines the operator to use when comparing the value of the switch member with the value specified.


Exceptions

ArgumentException

The name is equals Empty.

ArgumentNullException

The name is a null reference (Nothing in Visual Basic).

ArgumentOutOfRangeException

The value is less than MinValue or greater than MaxValue.


Remarks

This constructor uses the OpcMemberSwitchConditionsField, Value and Operator for the Conditions property.

Bit

Gets the zero-based number of the bit in the 'EncodingMask' which controls the existence of an optional member.

C#

public int Bit { get; }


Property Value

Int32

A value between 0 and 63 (inclusive) which refers to the bit in the 'EncodingMask' evaluated to control the existence of an optional member or -1 in case there the OpcMemberSwitch refers to a switch member using its Name.

Conditions

Gets a value which identities in which way the current OpcMemberSwitch decides whether a member exists.

C#

public OpcMemberSwitchConditions Conditions { get; }


Property Value

OpcMemberSwitchConditions

A combination of the members defined by the OpcMemberSwitchConditions enumeration.



Remarks

The value of this property depends on which constructor of the OpcMemberSwitch class has been used. For more details see the documentation of the constructors.

Name

Gets the name of the switch member its value is compared to control the existence of an optional member.

C#

public string Name { get; }


Property Value

String

The String which identifies the member its value is to be evaluated.

Operator

Gets a value which defines the relational operator to use when comparing the value of a referenced Bit or the value of a referenced switch member refered to by Name.

C#

public OpcMemberSwitchOperator Operator { get; }


Property Value

OpcMemberSwitchOperator

One of the members defined by the OpcMemberSwitchOperator enumeration.

Value

Gets the value towards the value of the switch member, referenced by the Bit of the 'EncodingMask' or by the Name, is to be compared using the Operator of the OpcMemberSwitch.

C#

public long Value { get; }


Property Value

Int64

The value towards the value of the switch member is compared.

Matches(Int64)

Evaluates the switch condition against the value specified.

C#

public bool Matches(long value)


Parameters

value Int64

The value of the 'EncodingMask' or the value of the switch member referenced by the Name to evaluate (the value is evaluated on the left using the Operator against the Value on the right).


Returns

Boolean

The value true if the value of the 'EncodingMask' specified declares the according Bit equals 'high' or if the value of the switch member compares to the Value with a result equals true; otherwise the value false.

ToString()

Returns a String representing the information used by the current OpcMemberSwitch.

C#

public override string ToString()


Returns

String

A String representing the current OpcMemberSwitch.