Namespace: Opc.UaFx
Assemblies: Opc.UaFx.Advanced.dll, Opc.UaFx.Advanced.dll
The OpcMemberSwitch type exposes the following members.
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
The bit
is less than 0 or greater than 63.
Remarks
This constructor uses the OpcMemberSwitchConditionsBit for the Conditions property.
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
The name
is equals Empty.
The name
is a null reference (Nothing in Visual Basic).
Remarks
This constructor uses the OpcMemberSwitchConditionsField for the Conditions property.
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
The name
is equals Empty.
The name
is a null reference (Nothing in Visual Basic).
The value
is less than MinValue or greater than MaxValue.
Remarks
This constructor uses the OpcMemberSwitchConditionsField and Value for the Conditions property.
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
The name
is equals Empty.
The name
is a null reference (Nothing in Visual Basic).
The value
is less than MinValue or greater than MaxValue.
Remarks
This constructor uses the OpcMemberSwitchConditionsField, Value and Operator for the Conditions property.
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
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.
Gets a value which identities in which way the current OpcMemberSwitch decides whether a member exists.
C#
public OpcMemberSwitchConditions Conditions { get; }
Property Value
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.
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
One of the members defined by the OpcMemberSwitchOperator enumeration.
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
The value towards the value of the switch member is compared.
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
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.
Returns a String representing the information used by the current OpcMemberSwitch.
C#
public override string ToString()
Returns
A String representing the current OpcMemberSwitch.