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

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...
 
int 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.
 

Detailed Description

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.

Member Function Documentation

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.

Parameters
identifierNodeId used to lookup the DataType definition. Could be the NodeId of the DataType or the encoding NodeId of a structure
pNewDefinitionDataType definition to add
overwriteFlag indicating if an existing definition should be replaced or not
Returns
True if the definition did already exist, false otherwise
UaDataTypeDictionary::DefinitionType UaDataTypeDictionaryBase::definitionType ( const UaNodeId dataTypeId)
virtual

Returns the DefinitionType for the specified data type.

Is called by definitionType(const UaVariant &vValue) and definitionType(const UaExtensionObject &vValue).

Implements UaDataTypeDictionary.

UaEnumDefinition UaDataTypeDictionaryBase::enumDefinition ( const UaNodeId dataTypeId)
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

Parameters
dataTypeIdNodeId of the enumeration DataType.

Implements UaDataTypeDictionary.

UaOptionSetDefinition UaDataTypeDictionaryBase::optionSetDefinition ( const UaNodeId dataTypeId)
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

Parameters
dataTypeIdNodeId of the option set DataType.

Implements UaDataTypeDictionary.

bool UaDataTypeDictionaryBase::removeDefinition ( const UaNodeId identifier)

Removes DataType definition object from the management.

Parameters
identifierNodeId used to lookup the DataType definition. Could be the NodeId of the DataType or the encoding NodeId of a structure
Returns
True if the definition was found and removed, false otherwise
UaSimpleDefinition UaDataTypeDictionaryBase::simpleDefinition ( const UaNodeId dataTypeId)
virtual

Returns the UaSimpleDefinition for a simple DataType.

Parameters
dataTypeIdNodeId of the simple DataType.

Reimplemented from UaDataTypeDictionary.

UaStructureDefinition UaDataTypeDictionaryBase::structureDefinition ( const UaNodeId dataTypeId)
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).

Parameters
dataTypeIdNodeId of the structure DataType.

Implements UaDataTypeDictionary.


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