C++ Based OPC UA Client/Server/PubSub SDK
1.7.9.586
|
Base class for managing DataType information for one server. More...
#include <uadatatypedictionarybase.h>
Inherits UaDataTypeDictionary.
Public Member Functions | |
UaDataTypeDictionaryBase () | |
Creates a UaDataTypeDictionaryBase object. | |
virtual | ~UaDataTypeDictionaryBase () |
Destroys the UaDataTypeDictionaryBase object. | |
void | clearDefinitions () |
Clear all DataTypeDefinition entries. | |
virtual DefinitionType | definitionType (const UaNodeId &dataTypeId) |
Returns the DefinitionType for the specified data type. More... | |
virtual UaEnumDefinition | enumDefinition (const UaNodeId &dataTypeId) |
Returns the UaEnumDefinition for the specified data type. More... | |
virtual UaOptionSetDefinition | optionSetDefinition (const UaNodeId &dataTypeId) |
Returns the UaOptionSetDefinition for the specified data type. More... | |
virtual UaStructureDefinition | structureDefinition (const UaNodeId &dataTypeId) |
Returns the UaStructureDefinition for the specified data type. More... | |
virtual UaSimpleDefinition | simpleDefinition (const UaNodeId &dataTypeId) |
Returns the UaSimpleDefinition for a simple DataType. More... | |
OpcUa_Size_t | numDefinitions () |
Returns the number of definitions. | |
bool | addDefinition (UaAbstractDefinition *pNewDefinition, bool overwrite=true) |
Add DataType definition object to the management. More... | |
bool | removeDefinition (const UaNodeId &identifier) |
Removes DataType definition object from the management. More... | |
Public Member Functions inherited from UaDataTypeDictionary | |
DefinitionType | definitionType (const UaVariant &vValue) |
Returns the UaDataTypeDictionary::DefinitionType of a variant. More... | |
DefinitionType | definitionType (const UaExtensionObject &vValue) |
Returns the UaDataTypeDictionary::DefinitionType of an ExtensionObject. More... | |
UaStructureDefinition | structureDefinition (const UaVariant &vValue) |
Returns the UaStructureDefinition of a variant. More... | |
UaStructureDefinition | structureDefinition (const UaExtensionObject &vValue) |
Returns the UaStructureDefinition of an ExtensionObject. More... | |
Additional Inherited Members | |
Public Types inherited from UaDataTypeDictionary | |
enum | DefinitionType |
Enumeration that indicates the DataType definition type. | |
Base class for managing DataType information for one server.
There are four main groups of OPC UA data types where this class provides the necessary information for processing of the data types.
Simple data types are subtypes of built-in data types and are transported as the corresponding built-in data type.
Enumerations provide string representations of numeric values but the transport of the value is always done with the built-in data type Int32.
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.
Structures are composed of an ordered list of fields where every field has a data type out or the four groups. Structures are transported in an ExtensionObject as byte blob (ByteString) and a type identifier.
bool UaDataTypeDictionaryBase::addDefinition | ( | UaAbstractDefinition * | pNewDefinition, |
bool | overwrite = true |
||
) |
Add DataType definition object to the management.
The method takes ownership of the passed definition.
If the definition does already exist, the new one replaces the existing one if overwrite is true.
identifier | NodeId used to lookup the DataType definition. Could be the NodeId of the DataType or the encoding NodeId of a structure |
pNewDefinition | DataType definition to add |
overwrite | Flag indicating if an existing definition should be replaced or not |
|
virtual |
Returns the DefinitionType for the specified data type.
Is called by definitionType(const UaVariant &vValue) and definitionType(const UaExtensionObject &vValue).
Implements UaDataTypeDictionary.
|
virtual |
Returns the UaEnumDefinition for the specified data type.
Returns a null UaEnumDefinition if the data type is unknown or not an enumeration. Use UaEnumDefinition::isNull() to check for a null definition
dataTypeId | NodeId of the enumeration DataType. |
Implements UaDataTypeDictionary.
|
virtual |
Returns the UaOptionSetDefinition for the specified data type.
Returns a null UaOptionSetDefinition if the data type is unknown or not an option set. Use UaOptionSetDefinition::isNull() to check for a null definition
dataTypeId | NodeId of the option set DataType. |
Implements UaDataTypeDictionary.
bool UaDataTypeDictionaryBase::removeDefinition | ( | const UaNodeId & | identifier | ) |
Removes DataType definition object from the management.
identifier | NodeId used to lookup the DataType definition. Could be the NodeId of the DataType or the encoding NodeId of a structure |
|
virtual |
Returns the UaSimpleDefinition for a simple DataType.
dataTypeId | NodeId of the simple DataType. |
Reimplemented from UaDataTypeDictionary.
|
virtual |
Returns the UaStructureDefinition for the specified data type.
Returns a null UaStructureDefinition if the data type is unknown or not a structure. Use UaStructureDefinition::isNull() to check for a null definition
Is called by structureDefinition(const UaVariant &vValue) and structureDefinition(const UaExtensionObject &vValue).
dataTypeId | NodeId of the structure DataType. |
Implements UaDataTypeDictionary.