C++ Based OPC UA Client/Server/PubSub SDK  1.7.6.537
UaOptionSetDefinition Class Reference

Manages the description for an OptionSet DataType. More...

#include <uaoptionsetdefinition.h>

Inherits UaAbstractDefinition.

Public Member Functions

 UaOptionSetDefinition ()
 Creates an instance.
 
 UaOptionSetDefinition (const UaOptionSetDefinition &other)
 Copies an UaOptionSetDefinition including all OptionSetValues.
 
UaOptionSetDefinitionoperator= (const UaOptionSetDefinition &other)
 Assignment operator.
 
bool operator== (const UaOptionSetDefinition &other) const
 Checks whether two UaOptionSetDefinitions are equal. More...
 
bool operator!= (const UaOptionSetDefinition &other) const
 Checks whether two UaOptionSetDefinitions are not equal. More...
 
virtual int childrenCount () const
 Returns the number of OptionSet values.
 
virtual bool isNull () const
 Checks if the OptionSetDefinition is null. More...
 
BaseType baseType () const
 Returns the base type id of the UaOptionSetDefinition. More...
 
void setBaseType (BaseType baseType)
 Sets the base type of the UaOptionSetDefinition. More...
 
UaEnumValue child (int i) const
 Returns the UaEnumValue for bit position i. More...
 
UaLocalizedTextArray children () const
 Returns the option set children as LocalizedText array. More...
 
void addChild (const UaEnumValue &newChild)
 Adds an OptionSet value as child. More...
 
void addChild (const UaString &sName, int value)
 Adds an OptionSet value as child. More...
 
void addChild (const UaString &sName, int value, const UaLocalizedText &sDocumentation)
 Adds an OptionSet value as child. More...
 
void addChild (const UaLocalizedText &newChild)
 Adds an OptionSet value as child. More...
 
bool hasValidBits () const
 Indicates if the OptionSet DataType provides valid bits. More...
 
void setBinaryEncodingId (const UaNodeId &nodeId)
 Sets the Binary encoding id. More...
 
UaNodeId binaryEncodingId () const
 Returns the Binary encoding id. More...
 
void setXmlEncodingId (const UaNodeId &nodeId)
 Sets the XML encoding id. More...
 
UaNodeId xmlEncodingId () const
 Returns the XML encoding id. More...
 
UaEnumDefinitionDataType getEnumDefinitionDataType () const
 Returns the definition of the enumeration DataType as EnumDefinitionDataType. More...
 
- Public Member Functions inherited from UaAbstractDefinition
void setDataTypeId (const UaNodeId &nodeId)
 Sets the DataTypeId of the UaAbstractDefinition.
 
UaNodeId dataTypeId () const
 Returns the DataTypeId of the UaAbstractDefinition. More...
 
void setName (const UaString &sName)
 Sets the Name of the UaAbstractDefinition.
 
UaString name () const
 Returns the name of the UaAbstractDefinition. More...
 
void setDocumentation (const UaLocalizedText &documentation)
 Sets the Documentation of the UaAbstractDefinition.
 
UaLocalizedText documentation () const
 Returns the documentation of the UaAbstractDefinition. More...
 
void setNamespace (const UaString &sNamespace)
 Sets the Namespace of the UaAbstractDefinition.
 
UaString getNamespace () const
 Returns the NamespaceUri of the UaAbstractDefinition. More...
 

Additional Inherited Members

- Protected Member Functions inherited from UaAbstractDefinition
 UaAbstractDefinition (UaAbstractDefinitionPrivate *pBody)
 Creates an instance. More...
 

Detailed Description

Manages the description for an OptionSet DataType.

OptionSets are bit masks where the data type provides names for all valid bits in the bit mask. An OptionSet is either a sub-type of one of the UInteger built-in types (Byte, UInt16, UInt32, UInt64) or a sub-type of the OptionSet structure. The option set based on the structure allows an unlimited size of the bit mask but has also a second bit mask that indicates the bits that are set (valid) in a OptionSet value.

The actually used base type is indicated with BaseType (baseType(), setBaseType()). The BaseType option BaseType_OptionSet provides valid bits. The availablity of valid bits can be checked with hasValidBits().

The bits are described with the class UaEnumValue. A UaEnumValue provides the name and the bit number of a bit.

This class can be used to add an OptionSet DataType on server side as well as a description of available DataTypes in a server on client side.

Member Function Documentation

void UaOptionSetDefinition::addChild ( const UaEnumValue newChild)

Adds an OptionSet value as child.

The class UaEnumValue holds the name, the bit number and documentation.

void UaOptionSetDefinition::addChild ( const UaString sName,
int  value 
)

Adds an OptionSet value as child.

The class UaEnumValue holds the name, the bit number and documentation.

void UaOptionSetDefinition::addChild ( const UaString sName,
int  value,
const UaLocalizedText sDocumentation 
)

Adds an OptionSet value as child.

The class UaEnumValue holds the name, the bit number and documentation.

void UaOptionSetDefinition::addChild ( const UaLocalizedText newChild)

Adds an OptionSet value as child.

The class UaEnumValue holds the name, the bit number and documentation.

UaOptionSetDefinition::BaseType UaOptionSetDefinition::baseType ( ) const

Returns the base type id of the UaOptionSetDefinition.

UaNodeId UaOptionSetDefinition::binaryEncodingId ( ) const

Returns the Binary encoding id.

UaEnumValue UaOptionSetDefinition::child ( int  i) const

Returns the UaEnumValue for bit position i.

UaLocalizedTextArray UaOptionSetDefinition::children ( ) const

Returns the option set children as LocalizedText array.

UaEnumDefinitionDataType UaOptionSetDefinition::getEnumDefinitionDataType ( ) const

Returns the definition of the enumeration DataType as EnumDefinitionDataType.

bool UaOptionSetDefinition::hasValidBits ( ) const

Indicates if the OptionSet DataType provides valid bits.

Option sets based on the OptionSet structure provides a second bit mask that indicates the bits that are set (valid) in a OptionSet value. The BaseType option BaseType_OptionSet provides these valid bits.

bool UaOptionSetDefinition::isNull ( ) const
virtual

Checks if the OptionSetDefinition is null.

Reimplemented from UaAbstractDefinition.

bool UaOptionSetDefinition::operator!= ( const UaOptionSetDefinition other) const

Checks whether two UaOptionSetDefinitions are not equal.

If the definitions are created separately but have the same content, this method returns true.

bool UaOptionSetDefinition::operator== ( const UaOptionSetDefinition other) const

Checks whether two UaOptionSetDefinitions are equal.

If the definitions are created separately but have the same content, this method returns false.

void UaOptionSetDefinition::setBaseType ( UaOptionSetDefinition::BaseType  baseType)

Sets the base type of the UaOptionSetDefinition.

void UaOptionSetDefinition::setBinaryEncodingId ( const UaNodeId nodeId)

Sets the Binary encoding id.

void UaOptionSetDefinition::setXmlEncodingId ( const UaNodeId nodeId)

Sets the XML encoding id.

UaNodeId UaOptionSetDefinition::xmlEncodingId ( ) const

Returns the XML encoding id.


The documentation for this class was generated from the following files: