C++ Based OPC UA Client/Server SDK
1.6.1.391
|
A class that serializes and deserializes data that is described by an UaOptionSetDefinition. More...
#include <uagenericoptionsetvalue.h>
Inherits UaAbstractGenericValue.
Public Member Functions | |
UaGenericOptionSetValue () | |
Creates an empty UaGenericOptionSetValue. More... | |
UaGenericOptionSetValue (const UaOptionSetDefinition &optionSetDefinition) | |
Creates a UaGenericOptionSetValue with each bit set to 0. More... | |
UaGenericOptionSetValue (const UaGenericOptionSetValue &other) | |
Copy constructor. More... | |
UaGenericOptionSetValue (const UaVariant &value, const UaOptionSetDefinition &optionSetDefinition) | |
Creates a UaGenericOptionSetValue. More... | |
virtual | ~UaGenericOptionSetValue () |
Desctruction. | |
virtual void | clear () |
Clears the UaGenericOptionSetValue. More... | |
bool | operator== (const UaGenericOptionSetValue &other) const |
Compares the content of two UaGenericOptionSetValues. | |
bool | operator!= (const UaGenericOptionSetValue &other) const |
Checks if two UaGenericOptionSetValues are unequal. More... | |
UaGenericOptionSetValue & | operator= (const UaGenericOptionSetValue &other) |
Assignment operator. More... | |
OpcUa_StatusCode | setOptionSetValue (const UaVariant &value, const UaOptionSetDefinition &optionSetDefinition) |
Sets a UaGenericOptionSetValue. More... | |
OpcUa_StatusCode | setValue (const UaString &sFieldName, OpcUa_Boolean bValue) |
Sets the value for a OptionSet field based on the field name. More... | |
OpcUa_StatusCode | setValue (int iIndex, OpcUa_Boolean bValue) |
Sets the value for a OptionSet field based on the field index. More... | |
OpcUa_Boolean | value (const UaString &sFieldName, OpcUa_StatusCode *status=0) const |
Returns the value for a OptionSet field based on the field name. More... | |
OpcUa_Boolean | value (int iIndex, OpcUa_StatusCode *status=0) const |
Returns the value for a OptionSet field based on the field index. More... | |
UaOptionSetDefinition | optionSetDefinition () const |
Returns the OptionSetDefinition of the UaGenericOptionSetValue. More... | |
void | setOptionSetDefinition (const UaOptionSetDefinition &definition) |
Clears the UaGenericOptionSetValue and sets the OptionSet definition. More... | |
UaString | toString () const |
Returns a string representation of the value. More... | |
virtual void | toVariant (UaVariant &variant, Encoding valueEncoding=Encoding_Binary) const |
Serializes the UaGenericValue to the variant. More... | |
virtual void | toVariant (OpcUa_Variant &variant, Encoding valueEncoding=Encoding_Binary) const |
Serializes the UaGenericValue to the variant. More... | |
void | decode (UaAbstractDecoder *pDecoder) |
Deserializing method that is used by the SDK internally. More... | |
void | encode (UaAbstractEncoder *pEncoder) const |
Serializing method that is used by the SDK internally. More... | |
Public Member Functions inherited from UaAbstractGenericValue | |
void | toDataValue (UaDataValue &dataValue, OpcUa_Boolean updateTimeStamps, Encoding valueEncoding=Encoding_Binary) const |
Serializes the UaGenericValue to the dataValue. More... | |
void | toDataValue (OpcUa_DataValue &dataValue, OpcUa_Boolean updateTimeStamps, Encoding valueEncoding=Encoding_Binary) const |
Serializes the UaGenericValue to the dataValue. More... | |
void | toExtensionObject (UaExtensionObject &extensionObject, Encoding valueEncoding=Encoding_Binary) const |
Serializes the UaGenericValue to the extensionObject. More... | |
void | toExtensionObject (OpcUa_ExtensionObject &extensionObject, Encoding valueEncoding=Encoding_Binary) const |
Serializes the UaGenericValue to the extensionObject. More... | |
Additional Inherited Members | |
Public Types inherited from UaAbstractGenericValue | |
enum | Encoding |
The possible encodings for a UaAbstractGenericValue. More... | |
Protected Member Functions inherited from UaAbstractGenericValue | |
UaStructureFieldData | readField (UaAbstractDecoder *pDecoder, const UaStructureField &field) const |
Deserializes a field. More... | |
void | writeField (UaAbstractEncoder *pEncoder, const UaStructureField &field, const UaStructureFieldData &value) const |
Serializes a field. More... | |
A class that serializes and deserializes data that is described by an UaOptionSetDefinition.
The serialized data can be accessed by index or by field name. The class can be used for DataTypes that are not registered to the stack.
UaGenericOptionSetValue::UaGenericOptionSetValue | ( | ) |
Creates an empty UaGenericOptionSetValue.
UaGenericOptionSetValue::UaGenericOptionSetValue | ( | const UaOptionSetDefinition & | optionSetDefinition | ) |
Creates a UaGenericOptionSetValue with each bit set to 0.
UaGenericOptionSetValue::UaGenericOptionSetValue | ( | const UaGenericOptionSetValue & | other | ) |
Copy constructor.
other | The UaGenericOptionSetValue to copy. |
UaGenericOptionSetValue::UaGenericOptionSetValue | ( | const UaVariant & | value, |
const UaOptionSetDefinition & | optionSetDefinition | ||
) |
Creates a UaGenericOptionSetValue.
value | The value that will be serialized. |
optionSetDefinition | The definition that is used for deserializing. |
|
virtual |
Clears the UaGenericOptionSetValue.
Clears all values and sets the OptionSetDefinition to an invalid definition.
Implements UaAbstractGenericValue.
|
virtual |
Deserializing method that is used by the SDK internally.
Implements UaAbstractGenericValue.
|
virtual |
Serializing method that is used by the SDK internally.
Implements UaAbstractGenericValue.
bool UaGenericOptionSetValue::operator!= | ( | const UaGenericOptionSetValue & | other | ) | const |
Checks if two UaGenericOptionSetValues are unequal.
UaGenericOptionSetValue & UaGenericOptionSetValue::operator= | ( | const UaGenericOptionSetValue & | other | ) |
Assignment operator.
UaOptionSetDefinition UaGenericOptionSetValue::optionSetDefinition | ( | ) | const |
Returns the OptionSetDefinition of the UaGenericOptionSetValue.
void UaGenericOptionSetValue::setOptionSetDefinition | ( | const UaOptionSetDefinition & | definition | ) |
Clears the UaGenericOptionSetValue and sets the OptionSet definition.
definition | The new OptionSet definition |
OpcUa_StatusCode UaGenericOptionSetValue::setOptionSetValue | ( | const UaVariant & | value, |
const UaOptionSetDefinition & | optionSetDefinition | ||
) |
Sets a UaGenericOptionSetValue.
value | The value that will be serialized. |
optionSetDefinition | The definition that is used for deserializing. |
OpcUa_StatusCode UaGenericOptionSetValue::setValue | ( | const UaString & | sFieldName, |
OpcUa_Boolean | bValue | ||
) |
Sets the value for a OptionSet field based on the field name.
sFieldName | Name of the OptionSet field to set. |
bValue | The new value for the field. |
OpcUa_StatusCode UaGenericOptionSetValue::setValue | ( | int | iIndex, |
OpcUa_Boolean | bValue | ||
) |
Sets the value for a OptionSet field based on the field index.
iIndex | Index of the OptionSet field to set. |
bValue | The new value for the field. |
UaString UaGenericOptionSetValue::toString | ( | ) | const |
Returns a string representation of the value.
This string can be used for showing in a GUI. There is no method fromString.
|
virtual |
Serializes the UaGenericValue to the variant.
Reimplemented from UaAbstractGenericValue.
|
virtual |
Serializes the UaGenericValue to the variant.
Reimplemented from UaAbstractGenericValue.
OpcUa_Boolean UaGenericOptionSetValue::value | ( | const UaString & | sFieldName, |
OpcUa_StatusCode * | status = 0 |
||
) | const |
Returns the value for a OptionSet field based on the field name.
sFieldName | Name of the OptionSet field value to return. |
status | Will be set to OpcUa_BadInvalidArgument if the name is invalid, OpcUa_Good otherwise. This argument can be null. |
OpcUa_Boolean UaGenericOptionSetValue::value | ( | int | iIndex, |
OpcUa_StatusCode * | status = 0 |
||
) | const |
Returns the value for a OptionSet field based on the field index.
iIndex | Index of the OptionSet field value to return. |
status | Will be set to OpcUa_BadInvalidArgument if the name is invalid, OpcUa_Good otherwise. This argument can be null. |