C++ Based OPC UA Client/Server SDK  1.5.5.355
TypeDictionaries Class Reference

Class for adding DataType definitions. More...

#include <typedictionaries.h>

Inherits TypeDictionariesAccess.

Public Member Functions

 TypeDictionaries (NodeManagerConfig *pNodeConfig, const UaString &sNamespaceUri)
 Construction. More...
 
 TypeDictionaries (NodeManagerConfig *pNodeConfig, const UaString &sNamespaceUri, const UaNodeId &typeDictionaryId, const UaString &sDictionaryName)
 Construction. More...
 
UaStatus addTypeDictionary (const UaNodeId &nodeId, const UaString &sName)
 Adds a DataTypeDictionary to the Binary DataTypeSystem. More...
 
void setTypeDictionary (OpcUa::DataTypeDictionaryType *pTypeDictionary)
 Sets the binary TypeDictionary without adding nodes. More...
 
void setXmlTypeDictionary (OpcUa::DataTypeDictionaryType *pTypeDictionary)
 Sets the XML TypeDictionary without adding nodes. More...
 
UaStatus addStructuredType (const UaStructureDefinition &structure)
 Adds a new DataType node and all needed DataTypeEncoding and DataTypeDescription nodes. More...
 
UaStatus addEnumeratedType (const UaEnumDefinition &enumeration, const UaNodeId &enumerationPropertyId=UaNodeId())
 Adds a new DataType node and the needed property. More...
 
UaStatus addOptionSetType (const UaOptionSetDefinition &optionSet, const UaNodeId &optionSetPropertyId=UaNodeId())
 Adds a new DataType node and the needed property. More...
 
UaStatus addStructuredTypes (std::list< UaStructureDefinition > &structures)
 Adds a list of new DataType nodes and all needed DataTypeEncoding and DataTypeDescription nodes. More...
 
UaStatus addEnumeratedTypes (std::list< UaEnumDefinition > &enumerations)
 Adds a list of new DataType nodes and the needed property. More...
 
UaStatus addOptionSetTypes (std::list< UaOptionSetDefinition > &optionSets)
 Adds a list of new DataType nodes and the needed property. More...
 
void setDataTypeVersion (const UaString &sDataTypeVersion)
 Sets the version of the dictionaries. More...
 
UaString dataTypeVersion () const
 Returns the version of the dictionaries. More...
 
- Public Member Functions inherited from TypeDictionariesAccess
 TypeDictionariesAccess (const UaString &sNamespaceUri)
 Construction. More...
 
virtual ~TypeDictionariesAccess ()
 Destructor.
 
void addStructuredTypeDefinition (const UaStructureDefinition &structure)
 Adds a new structured DataType without adding nodes. More...
 
void addEnumeratedTypeDefinition (const UaEnumDefinition &enumeration)
 Adds a new enumerated DataType without adding nodes. More...
 
virtual
UaDataTypeDictionary::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 UaStructureDefinition structureDefinition (const UaNodeId &dataTypeId)
 Returns the UaStructureDefinition for the specified data type. More...
 
virtual UaOptionSetDefinition optionSetDefinition (const UaNodeId &dataTypeId)
 Returns the UaOptionSetDefinition for the specified data type. 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 whether a UaEnumDefinition or a UaStructureDefinition is available.
 

Detailed Description

Class for adding DataType definitions.

This class adds nodes and updates the dictionary.

Constructor & Destructor Documentation

TypeDictionaries::TypeDictionaries ( NodeManagerConfig pNodeConfig,
const UaString sNamespaceUri 
)

Construction.

Parameters
pNodeConfigThe NodeManager for adding nodes and references
sNamespaceUriThe namespace uri for dictionary and NamespaceUri property of the binary DataTypeDictionary node
TypeDictionaries::TypeDictionaries ( NodeManagerConfig pNodeConfig,
const UaString sNamespaceUri,
const UaNodeId typeDictionaryId,
const UaString sDictionaryName 
)

Construction.

Creates a new DataTypeDictionary for OPC Binary

Parameters
pNodeConfigThe NodeManager for adding nodes and references
sNamespaceUriThe namespace uri for dictionary and NamespaceUri property of the binary DataTypeDictionary node
typeDictionaryIdThe NodeId of the newly created DataTypeDictionary.
sDictionaryNameThe name of the newly created DataTypeDictionary.

Member Function Documentation

UaStatus TypeDictionaries::addEnumeratedType ( const UaEnumDefinition enumeration,
const UaNodeId enumerationPropertyId = UaNodeId() 
)

Adds a new DataType node and the needed property.

Updates the DataTypeDictionary if the compiler flag SUPPORT_XML_PARSER is set to 1. The method addTypeDictionary must be called before calling this method.

Parameters
enumerationThe NamespaceIndex of the DataType must be equal to the NamespaceIndex of the NodeConfig.
enumerationPropertyIdIf null, a string NodeId is creates for the property.
UaStatus TypeDictionaries::addEnumeratedTypes ( std::list< UaEnumDefinition > &  enumerations)

Adds a list of new DataType nodes and the needed property.

Updates the DataTypeDictionary if the compiler flag SUPPORT_XML_PARSER is set to 1. The method addTypeDictionary must be called before calling this method.

Parameters
enumerationsThe NamespaceIndex of the DataTypes must be equal to the NamespaceIndex of the NodeConfig.
UaStatus TypeDictionaries::addOptionSetType ( const UaOptionSetDefinition optionSet,
const UaNodeId optionSetPropertyId = UaNodeId() 
)

Adds a new DataType node and the needed property.

Updates the DataTypeDictionary if the compiler flag SUPPORT_XML_PARSER is set to 1 and optionSet has base type OptionSet. The method addTypeDictionary must be called before calling this method.

Parameters
optionSetThe NamespaceIndex of the DataType must be equal to the NamespaceIndex of the NodeConfig.
optionSetPropertyIdIf null, a string NodeId is creates for the property.
UaStatus TypeDictionaries::addOptionSetTypes ( std::list< UaOptionSetDefinition > &  optionSets)

Adds a list of new DataType nodes and the needed property.

Updates the DataTypeDictionary if the compiler flag SUPPORT_XML_PARSER is set to 1 and one of the optionSets has base type OptionSet. The method addTypeDictionary must be called before calling this method.

Parameters
optionSetsThe NamespaceIndex of the DataTypes must be equal to the NamespaceIndex of the NodeConfig.
UaStatus TypeDictionaries::addStructuredType ( const UaStructureDefinition structure)

Adds a new DataType node and all needed DataTypeEncoding and DataTypeDescription nodes.

Updates the DataTypeDictionary if the compiler flag SUPPORT_XML_PARSER is set to 1. The method addTypeDictionary must be called before calling this method.

Parameters
structureThe NamespaceIndex of the DataType and the BinaryEncodingId must be equal to the NamespaceIndex of the NodeConfig.
UaStatus TypeDictionaries::addStructuredTypes ( std::list< UaStructureDefinition > &  structures)

Adds a list of new DataType nodes and all needed DataTypeEncoding and DataTypeDescription nodes.

Updates the DataTypeDictionary if the compiler flag SUPPORT_XML_PARSER is set to 1. The method addTypeDictionary must be called before calling this method.

Parameters
structuresThe NamespaceIndex of the DataTypes and the BinaryEncodingId must be equal to the NamespaceIndex of the NodeConfig.
UaStatus TypeDictionaries::addTypeDictionary ( const UaNodeId nodeId,
const UaString sName 
)

Adds a DataTypeDictionary to the Binary DataTypeSystem.

Parameters
nodeIdThe NodeId of the Dictionary node. The NamespaceIndex must match the NamespaceIndex of the NodeConfig.
sNameThe name of the Dictionary node
UaString TypeDictionaries::dataTypeVersion ( ) const

Returns the version of the dictionaries.

The method addTypeDictionary must be called before calling this method.

void TypeDictionaries::setDataTypeVersion ( const UaString sDataTypeVersion)

Sets the version of the dictionaries.

The method addTypeDictionary must be called before calling this method.

void TypeDictionaries::setTypeDictionary ( OpcUa::DataTypeDictionaryType pTypeDictionary)

Sets the binary TypeDictionary without adding nodes.

Parameters
pTypeDictionaryThe binary TypeDictionary.
void TypeDictionaries::setXmlTypeDictionary ( OpcUa::DataTypeDictionaryType pTypeDictionary)

Sets the XML TypeDictionary without adding nodes.

Parameters
pTypeDictionaryThe XML TypeDictionary.

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