C++ Based OPC UA Client/Server/PubSub SDK  1.7.6.537
PubSubBase::PubSubConfiguration Class Reference

Management class for a PubSub configuration. More...

#include <pubsubconfiguration.h>

Inherits PubSubBase::PubSubObject.

Public Member Functions

 PubSubConfiguration ()
 Creates an instance of the PubSub Configuration object. More...
 
UaStatus loadConfiguration (const UaString &sConfigurationFile)
 Loads the PubSub configuration from a OPC UA Binary encoded file. More...
 
UaStatus loadConfiguration (const UaString &sConfigurationFile, bool initializeStack)
 Loads the PubSub configuration from a OPC UA Binary encoded file. More...
 
UaStatus loadConfiguration (const UaString &sConfigurationFile, bool initializeStack, const UaStringArray &targetNamepsaces)
 Loads the PubSub configuration from a OPC UA Binary encoded file. More...
 
UaStatus loadConfiguration (const UaByteString &bsConfiguration, bool initializeStack)
 Loads the PubSub configuration from a ByteString containing the UABinaryFileDataType as extension object. More...
 
UaStatus loadConfiguration (const UaByteString &bsConfiguration, bool initializeStack, const UaStringArray &targetNamepsaces)
 Loads the PubSub configuration from a ByteString containing the UABinaryFileDataType as extension object. More...
 
UaStatus loadConfiguration (const UaStringArray &namespaceTable, const UaPubSubConfigurationDataType &pubSubConfiguration)
 Loads the PubSub configuration with a PubSubConfigurationDataType. More...
 
UaStatus loadConfiguration (const UaStringArray &namespaceTable, const UaPubSubConfigurationDataType &pubSubConfiguration, bool initializeStack)
 Loads the PubSub configuration with a PubSubConfigurationDataType. More...
 
UaStatus saveConfiguration (const UaString &sConfigurationFile)
 Saves the PubSub configuration to a OPC UA Binary encoded file. More...
 
UaStatus saveConfiguration (UaByteString &bsConfiguration)
 Saves the PubSub configuration to a binary blob. More...
 
UaStatus saveConfiguration (UaStringArray &namespaceTable, UaPubSubConfigurationDataType &pubSubConfiguration)
 Saves the PubSub configuration to a PubSubConfigurationDataType. More...
 
UaStatus applyChanges ()
 Apply all configuration changes to the current configuration.
 
void clear ()
 Clears the configuration.
 
UaStringArray namespaceTable () const
 Returns the namespace table currently used by the configuration. More...
 
void setNamespaceTable (const UaStringArray &namespaces)
 Sets the namespace table used by the configuration. More...
 
UaStatus mapNamespaceTable (const UaStringArray &newNamespaceTable)
 Map the namespace indices of the configuration from the existing namespace table to the passed namespace table. More...
 
UaStructureDescriptions structureDataTypes () const
 Returns the description of structure DataTypes used by the configuration. More...
 
void setStructureDataTypes (const UaStructureDescriptions &structureDataTypes)
 Sets the description of structure DataTypes used by the configuration. More...
 
UaEnumDescriptions enumDataTypes () const
 Returns the description of enumeration DataTypes used by the configuration. More...
 
void setEnumDataTypes (const UaEnumDescriptions &enumDataTypes)
 Sets the description of enumeration DataTypes used by the configuration. More...
 
UaSimpleTypeDescriptions simpleDataTypes ()
 Returns the description of simple DataTypes used by the configuration. More...
 
void setSimpleDataTypes (const UaSimpleTypeDescriptions &simpleDataTypes)
 Sets the description of simple DataTypes used by the configuration. More...
 
UaString schemaLocation () const
 Returns the schema location used by the configuration. More...
 
void setSchemaLocation (const UaString &schemaLocation)
 Sets the schema location used by the configuration. More...
 
UaKeyValuePairs fileHeader () const
 Returns the additional header fields for the configuration. More...
 
void setFileHeader (const UaKeyValuePairs &fileHeader)
 Sets the additional header fields for the configuration. More...
 
void addFileHeader (const UaQualifiedName &key, const UaVariant &value)
 Add an entry to the additional header fields for the configuration. More...
 
bool enabled () const
 Returns the enabled state of the PubSub configuration.
 
void setEnabled (bool bEnabled)
 Sets the enabled state of the PubSub configuration.
 
PubSubConnectionaddConnection (TransportFacet transportFacet)
 Adds a PubSub connection to the configuration.
 
PubSubConnectionaddConnection_Datagram (const UaString &name, bool enabled, const UaVariant &publisherId, const UaString &address, const UaString &networkInterface, const UaString &discoveryAddress, TransportFacet transportFacet=PubSubObject::TransportFacet_PubSub_UDP_UADP)
 Adds a PubSub connection for a Datagram related transport to the configuration. More...
 
PubSubConnectionaddConnection_Broker (const UaString &name, bool enabled, const UaVariant &publisherId, const UaString &address, TransportFacet transportFacet)
 Adds a PubSub connection for a Broker related transport to the configuration. More...
 
PubSubConnectionaddConnection (const UaPubSubConnectionDataType &pubSubConnection)
 Adds a PubSub connection for the configuration. More...
 
PubSubConnectionaddConnection (const OpcUa_PubSubConnectionDataType &pubSubConnection)
 Adds a PubSub connection for the configuration. More...
 
OpcUa_UInt32 connectionCount () const
 Returns the number of connection.
 
PubSubConnectiongetConnection (OpcUa_UInt32 index)
 Returns the connection at index or NULL if index is outside the valid range.
 
UaStatus removeConnection (PubSubConnection *pConnection)
 Removes the passed connection.
 
PublishedDataSetaddDataSet (const UaString &name, const UaStringArray &fieldNames, const UaNodeIdArray &publishedVariableNodeIds, const UaByteArray &publishedVariableBuiltInTypes, const UaInt32Array &publishedVariableValueRanks)
 Adds a PublishedDataSet to the configuration. More...
 
PublishedDataSetaddDataSet (const UaString &name, const UaStringArray &fieldNames, const UaNodeIdArray &publishedVariableNodeIds, const UaByteArray &publishedVariableBuiltInTypes, const UaNodeIdArray &publishedVariableDataTypes, const UaInt32Array &publishedVariableValueRanks)
 Adds a PublishedDataSet to the configuration. More...
 
PublishedDataSetaddDataSet (const UaString &name, const UaVersionTime &minorVersion, const UaVersionTime &majorVersion, const UaStringArray &fieldNames, const UaGuidArray &fieldIds, const UaNodeIdArray &publishedVariableNodeIds, const UaByteArray &publishedVariableBuiltInTypes, const UaNodeIdArray &publishedVariableDataTypes, const UaInt32Array &publishedVariableValueRanks)
 Adds a PublishedDataSet to the configuration. More...
 
PublishedDataSetaddDataSet (const UaPublishedDataSetDataType &publishedDataSet)
 Adds a PublishedDataSet to the configuration. More...
 
PublishedDataSetaddDataSet (const OpcUa_PublishedDataSetDataType &publishedDataSet)
 Adds a PublishedDataSet to the configuration. More...
 
OpcUa_UInt32 dataSetCount () const
 Returns the number of DataSets.
 
PublishedDataSetgetDataSet (OpcUa_UInt32 index)
 Returns the DataSet at index or NULL if index is outside the valid range.
 
UaStatus removeDataSet (PublishedDataSet *pDataSet)
 Removes the passed DataSet.
 
void setPubSubControlCallback (PubSubControlCallback *pPubSubControlCallback)
 Set PubSubControlCallback.
 
- Public Member Functions inherited from PubSubBase::PubSubObject
 PubSubObject (PubSubResources *pPubSubResources, TransportFacet transportFacet, ConfigurationState configurationState)
 Creates an instance of the PubSubObject.
 
UaMutexpConfigMutex () const
 Get the shared mutex for the complete configuration.
 
void incrementErrorCounter ()
 Increments the error counter for the PubSub object.
 
void decrementErrorCounter ()
 Decrements the error counter for the PubSub object.
 
- Public Member Functions inherited from ReferenceCounter
 ReferenceCounter ()
 construction
 
virtual ~ReferenceCounter ()
 destruction
 

Static Public Member Functions

static UaStatus saveConfiguration (const UaString &sConfigurationFile, OpcUa_PubSubConfigurationDataType *pConfiguration, const UaStringArray &namespaces)
 Saves the PubSub configuration to an OPC UA Binary encoded file. More...
 
static UaStatus saveConfiguration (const UaString &sConfigurationFile, OpcUa_PubSubConfigurationDataType *pConfiguration, const UaStringArray &namespaces, const UaStructureDescriptions &structureDataTypes, const UaEnumDescriptions &enumDataTypes, const UaSimpleTypeDescriptions &simpleDataTypes, const UaString &schemaLocation, const UaKeyValuePairs &fileHeader)
 Saves the PubSub configuration to an OPC UA Binary encoded file. More...
 
static UaStatus saveConfiguration (UaByteString &bsConfiguration, OpcUa_PubSubConfigurationDataType *pConfiguration, const UaStringArray &namespaces)
 Saves the PubSub configuration to a binary blob. More...
 

Protected Member Functions

virtual ~PubSubConfiguration ()
 Destroys the PubSub Configuration object.
 
- Protected Member Functions inherited from PubSubBase::PubSubObject
virtual ~PubSubObject ()
 Destroys the PubSubObject object.
 

Additional Inherited Members

- Public Types inherited from PubSubBase::PubSubObject
enum  PubSubObjectType
 PubSub transport facet reflecting the defined TransportProfileUris.
 
enum  TransportFacet {
  TransportFacet_None = 0x0, TransportFacet_PubSub_UDP_UADP = 0x11, TransportFacet_PubSub_ETH_UADP = 0x21, TransportFacet_PubSub_AMQP_UADP = 0x31,
  TransportFacet_PubSub_MQTT_UADP = 0x41, TransportFacet_PubSub_CUSTOM = 0xFF
}
 PubSub transport facet reflecting the defined TransportProfileUris. More...
 
enum  ConfigurationState {
  ConfigurationState_None, ConfigurationState_Deleted, ConfigurationState_InSyncWithStruct, ConfigurationState_New,
  ConfigurationState_Modified
}
 PubSub configuration object state. More...
 
enum  PubSubHeaderLayout { PubSubHeaderLayout_Custom, PubSubHeaderLayout_UADP_PeriodicFixed, PubSubHeaderLayout_UADP_Dynamic }
 PubSub header configuration. More...
 

Detailed Description

Management class for a PubSub configuration.

A PubSub configuration consist of the configuration for PubSub communication objects like PubSubConnection, WriterGroup, DataSetWriter and DataSetReader, the configuration of published DataSets and a table of namespaces used in the configuration.

The classes managing the configuration and the contained objects are reference counted. They are created with new and deleted with releaseReference().

Constructor & Destructor Documentation

PubSubBase::PubSubConfiguration::PubSubConfiguration ( )

Creates an instance of the PubSub Configuration object.

The class is reference counted and deletion is only possible with releaseReference().

Member Function Documentation

PubSubConnection * PubSubBase::PubSubConfiguration::addConnection ( const UaPubSubConnectionDataType pubSubConnection)

Adds a PubSub connection for the configuration.

Parameters
[in]pubSubConnectionConnection configuration structure
PubSubConnection * PubSubBase::PubSubConfiguration::addConnection ( const OpcUa_PubSubConnectionDataType &  pubSubConnection)

Adds a PubSub connection for the configuration.

Parameters
[in]pubSubConnectionConnection configuration structure
PubSubConnection * PubSubBase::PubSubConfiguration::addConnection_Broker ( const UaString name,
bool  enabled,
const UaVariant publisherId,
const UaString address,
TransportFacet  transportFacet 
)

Adds a PubSub connection for a Broker related transport to the configuration.

Fills a PubSubConnectionDataType with TransportSettings initialized to BrokerConnectionTransportDataType. The broker TransportSettings are initialized with empty strings.

The Address.NetworkInterface setting is initialized with an empty string.

Parameters
[in]nameName of the connection
[in]enabledEnable state of the connection
[in]publisherIdPublisherId for the connection
[in]addressAddress used for the connection
[in]transportFacetTransport facet for the connection. Valid options are AMQP-UADP and MQTT-UADP.
PubSubConnection * PubSubBase::PubSubConfiguration::addConnection_Datagram ( const UaString name,
bool  enabled,
const UaVariant publisherId,
const UaString address,
const UaString networkInterface,
const UaString discoveryAddress,
TransportFacet  transportFacet = PubSubObject::TransportFacet_PubSub_UDP_UADP 
)

Adds a PubSub connection for a Datagram related transport to the configuration.

Fills a PubSubConnectionDataType with TransportSettings initialized to DatagramConnectionTransportDataType. The Datagram TransportSetting DiscoveryAddress.NetworkInterface is configured with the networkInterface setting that is also used for the Connection Address.NetworkInterface.

Parameters
[in]nameName of the connection
[in]enabledEnable state of the connection
[in]publisherIdPublisherId for the connection
[in]addressAddress used for the connection
[in]networkInterfaceNetwork interface used for the Address and for Datagram transpor DiscoveryAddress
[in]discoveryAddressDiscovery address used for the Datagram transport settings
[in]transportFacetTransport facet for the connection. Valid options are UDP-UADP and ETH-UADP.
PublishedDataSet * PubSubBase::PubSubConfiguration::addDataSet ( const UaString name,
const UaStringArray fieldNames,
const UaNodeIdArray publishedVariableNodeIds,
const UaByteArray publishedVariableBuiltInTypes,
const UaInt32Array publishedVariableValueRanks 
)

Adds a PublishedDataSet to the configuration.

Parameters
[in]nameName of the DataSet
[in]fieldNamesArray of field names
[in]publishedVariableNodeIdsArray of NodeIds representing the published Variables wich are the source for the DataSet. The size of the array must match fieldNames.
[in]publishedVariableBuiltInTypesArray of built-in types for the variables. The size of the array must match fieldNames.
[in]publishedVariableValueRanksArray of value ranks for the variables. The size of the array must match fieldNames.
PublishedDataSet * PubSubBase::PubSubConfiguration::addDataSet ( const UaString name,
const UaStringArray fieldNames,
const UaNodeIdArray publishedVariableNodeIds,
const UaByteArray publishedVariableBuiltInTypes,
const UaNodeIdArray publishedVariableDataTypes,
const UaInt32Array publishedVariableValueRanks 
)

Adds a PublishedDataSet to the configuration.

Parameters
[in]nameName of the DataSet
[in]fieldNamesArray of field names
[in]publishedVariableNodeIdsArray of NodeIds representing the published Variables wich are the source for the DataSet. The size of the array must match fieldNames.
[in]publishedVariableBuiltInTypesArray of built-in types for the variables. The size of the array must match fieldNames.
[in]publishedVariableDataTypesArray of DataTypes. The size of the array must match fieldNames. If the array is empty, built-in types are used.
[in]publishedVariableValueRanksArray of value ranks for the variables. The size of the array must match fieldNames.
PublishedDataSet * PubSubBase::PubSubConfiguration::addDataSet ( const UaString name,
const UaVersionTime minorVersion,
const UaVersionTime majorVersion,
const UaStringArray fieldNames,
const UaGuidArray fieldIds,
const UaNodeIdArray publishedVariableNodeIds,
const UaByteArray publishedVariableBuiltInTypes,
const UaNodeIdArray publishedVariableDataTypes,
const UaInt32Array publishedVariableValueRanks 
)

Adds a PublishedDataSet to the configuration.

Parameters
[in]nameName of the DataSet
[in]minorVersionMinor version for the DataSet
[in]majorVersionMajor version for the DataSet
[in]fieldNamesArray of field names
[in]fieldIdsArray of field IDs. The size of the array must match fieldNames. If the array is empty, the field IDs are generated.
[in]publishedVariableNodeIdsArray of NodeIds representing the published Variables wich are the source for the DataSet. The size of the array must match fieldNames.
[in]publishedVariableBuiltInTypesArray of built-in types for the variables. The size of the array must match fieldNames.
[in]publishedVariableDataTypesArray of DataTypes. The size of the array must match fieldNames. If the array is empty, built-in types are used.
[in]publishedVariableValueRanksArray of value ranks for the variables. The size of the array must match fieldNames.
PublishedDataSet * PubSubBase::PubSubConfiguration::addDataSet ( const UaPublishedDataSetDataType publishedDataSet)

Adds a PublishedDataSet to the configuration.

Parameters
[in]publishedDataSetConfiguration structure for the new PublishedDataSet
PublishedDataSet * PubSubBase::PubSubConfiguration::addDataSet ( const OpcUa_PublishedDataSetDataType &  publishedDataSet)

Adds a PublishedDataSet to the configuration.

Parameters
[in]publishedDataSetConfiguration structure for the new PublishedDataSet
void PubSubBase::PubSubConfiguration::addFileHeader ( const UaQualifiedName key,
const UaVariant value 
)

Add an entry to the additional header fields for the configuration.

If the key already exists, the value of the existing entry is overwritten.

UaEnumDescriptions PubSubBase::PubSubConfiguration::enumDataTypes ( ) const

Returns the description of enumeration DataTypes used by the configuration.

The DataTypes are part of the UABinaryFileDataType used as container for the PubSubConfiguration. It provides the schema header with namespaces and descriptions of data types used in the PubSubConfiguration.

UaKeyValuePairs PubSubBase::PubSubConfiguration::fileHeader ( ) const

Returns the additional header fields for the configuration.

The header fields are part of the UABinaryFileDataType used as container for the PubSubConfiguration. It provides the schema header with namespaces and descriptions of data types used in the PubSubConfiguration.

UaStatus PubSubBase::PubSubConfiguration::loadConfiguration ( const UaString sConfigurationFile)

Loads the PubSub configuration from a OPC UA Binary encoded file.

The file must contain an extension object with a UABinaryFileDataType. The UABinaryFileDataType must contain a PubSubConfigurationDataType structure with the PubSub configuration. The header of the UABinaryFileDataType provides a namespace table and data type definitions for the configuration data in the PubSubConfigurationDataType.

Parameters
[in]sConfigurationFilePath and name of PubSub configuration file
UaStatus PubSubBase::PubSubConfiguration::loadConfiguration ( const UaString sConfigurationFile,
bool  initializeStack 
)

Loads the PubSub configuration from a OPC UA Binary encoded file.

The file must contain an extension object with a UABinaryFileDataType. The UABinaryFileDataType must contain a PubSubConfigurationDataType structure with the PubSub configuration. The header of the UABinaryFileDataType provides a namespace table and data type definitions for the configuration data in the PubSubConfigurationDataType.

Parameters
[in]sConfigurationFilePath and name of PubSub configuration file
[in]initializeStackFlag indicating if the PubSub stack should be initialized with the configuration
UaStatus PubSubBase::PubSubConfiguration::loadConfiguration ( const UaString sConfigurationFile,
bool  initializeStack,
const UaStringArray targetNamepsaces 
)

Loads the PubSub configuration from a OPC UA Binary encoded file.

The file must contain an extension object with a UABinaryFileDataType. The UABinaryFileDataType must contain a PubSubConfigurationDataType structure with the PubSub configuration. The header of the UABinaryFileDataType provides a namespace table and data type definitions for the configuration data in the PubSubConfigurationDataType.

If the target namespaces are provided, the namespace index mapping is executed to convert any namespace index in the configuration to the corresponding target namesace index provided by the targetNamepsaces parameter.

Parameters
[in]sConfigurationFilePath and name of PubSub configuration file
[in]initializeStackFlag indicating if the PubSub stack should be initialized with the configuration for communication
[in]targetNamepsacesTarget namespaces for the application. If the array is provided, a namespace index in the configuration is mapped to the target index.
UaStatus PubSubBase::PubSubConfiguration::loadConfiguration ( const UaByteString bsConfiguration,
bool  initializeStack 
)

Loads the PubSub configuration from a ByteString containing the UABinaryFileDataType as extension object.

The ByteString must contain an extension object with a UABinaryFileDataType. The UABinaryFileDataType must contain a PubSubConfigurationDataType structure with the PubSub configuration. The header of the UABinaryFileDataType provides a namespace table and data type definitions for the configuration data in the PubSubConfigurationDataType.

Parameters
[in]bsConfigurationContent of the PubSub configuration file
[in]initializeStackFlag indicating if the PubSub stack should be initialized with the configuration for communication
UaStatus PubSubBase::PubSubConfiguration::loadConfiguration ( const UaByteString bsConfiguration,
bool  initializeStack,
const UaStringArray targetNamepsaces 
)

Loads the PubSub configuration from a ByteString containing the UABinaryFileDataType as extension object.

The ByteString must contain an extension object with a UABinaryFileDataType. The UABinaryFileDataType must contain a PubSubConfigurationDataType structure with the PubSub configuration. The header of the UABinaryFileDataType provides a namespace table and data type definitions for the configuration data in the PubSubConfigurationDataType.

If the target namespaces are provided, the namespace index mapping is executed to convert any namespace index in the configuration to the corresponding target namesace index provided by the targetNamepsaces parameter.

Parameters
[in]bsConfigurationContent of the PubSub configuration file
[in]initializeStackFlag indicating if the PubSub stack should be initialized with the configuration for communication
[in]targetNamepsacesTarget namespaces for the application. If the array is provided, a namespace index in the configuration is mapped to the target index.
UaStatus PubSubBase::PubSubConfiguration::loadConfiguration ( const UaStringArray namespaceTable,
const UaPubSubConfigurationDataType pubSubConfiguration 
)

Loads the PubSub configuration with a PubSubConfigurationDataType.

The ByteString must contain an extension object with a UABinaryFileDataType. The UABinaryFileDataType must contain a PubSubConfigurationDataType structure with the PubSub configuration. The header of the UABinaryFileDataType provides a namespace table and data type definitions for the configuration data in the PubSubConfigurationDataType.

Parameters
[in]namespaceTableNamespace table for the PubSub configuration structure
[in]pubSubConfigurationPubSub configuration as structure
UaStatus PubSubBase::PubSubConfiguration::loadConfiguration ( const UaStringArray namespaceTable,
const UaPubSubConfigurationDataType pubSubConfiguration,
bool  initializeStack 
)

Loads the PubSub configuration with a PubSubConfigurationDataType.

The ByteString must contain an extension object with a UABinaryFileDataType. The UABinaryFileDataType must contain a PubSubConfigurationDataType structure with the PubSub configuration. The header of the UABinaryFileDataType provides a namespace table and data type definitions for the configuration data in the PubSubConfigurationDataType.

Parameters
[in]namespaceTableNamespace table for the PubSub configuration structure
[in]pubSubConfigurationPubSub configuration as structure
[in]initializeStackFlag indicating if the PubSub stack should be initialized with the configuration for communication
UaStatus PubSubBase::PubSubConfiguration::mapNamespaceTable ( const UaStringArray newNamespaceTable)

Map the namespace indices of the configuration from the existing namespace table to the passed namespace table.

The index into the array is referred to as NamespaceIndex. The NamespaceIndex is used in NodeIds and QualifiedNames, rather than the longer namespace URI. NamespaceIndex 0 is reserved for the OPC UA namespace and it is not included in this array.

Parameters
[in]newNamespaceTableNew namespace array for the namespace table
UaStringArray PubSubBase::PubSubConfiguration::namespaceTable ( ) const

Returns the namespace table currently used by the configuration.

The namespace table is part of the UABinaryFileDataType used as container for the PubSubConfiguration. It provides the schema header with namespaces and descriptions of data types used in the PubSubConfiguration.

The index into the array is referred to as NamespaceIndex. The NamespaceIndex is used in NodeIds and QualifiedNames, rather than the longer namespace URI. NamespaceIndex 0 is reserved for the OPC UA namespace and it is not included in this array.

UaStatus PubSubBase::PubSubConfiguration::saveConfiguration ( const UaString sConfigurationFile)

Saves the PubSub configuration to a OPC UA Binary encoded file.

The contend of the file is the UABinaryFileDataType UA binary encoded as ExtensionObject where the body of the UABinaryFileDataType is a UA binar encoded PubSubConfigurationDataType structure.

Parameters
[in]sConfigurationFilePath and name of PubSub configuration file
UaStatus PubSubBase::PubSubConfiguration::saveConfiguration ( UaByteString bsConfiguration)

Saves the PubSub configuration to a binary blob.

Parameters
[out]bsConfigurationThe UaByteString to store the config to
UaStatus PubSubBase::PubSubConfiguration::saveConfiguration ( UaStringArray namespaceTable,
UaPubSubConfigurationDataType pubSubConfiguration 
)

Saves the PubSub configuration to a PubSubConfigurationDataType.

The contend of the file is the UABinaryFileDataType UA binary encoded as ExtensionObject where the body of the UABinaryFileDataType is a UA binar encoded PubSubConfigurationDataType structure.

Parameters
[out]namespaceTableNamespace table for the PubSub configuration structure
[out]pubSubConfigurationPubSub configuration as structure
UaStatus PubSubBase::PubSubConfiguration::saveConfiguration ( const UaString sConfigurationFile,
OpcUa_PubSubConfigurationDataType *  pConfiguration,
const UaStringArray namespaces 
)
static

Saves the PubSub configuration to an OPC UA Binary encoded file.

The contend of the file is the UABinaryFileDataType UA binary encoded as ExtensionObject where the body of the UABinaryFileDataType is a UA binar encoded PubSubConfigurationDataType structure.

Parameters
[in]sConfigurationFilePath and name of PubSub configuration file
[in]pConfigurationConfiguration structure to save
[in]namespacesNamespaces for the configuration structure to save
UaStatus PubSubBase::PubSubConfiguration::saveConfiguration ( const UaString sConfigurationFile,
OpcUa_PubSubConfigurationDataType *  pConfiguration,
const UaStringArray namespaces,
const UaStructureDescriptions structureDataTypes,
const UaEnumDescriptions enumDataTypes,
const UaSimpleTypeDescriptions simpleDataTypes,
const UaString schemaLocation,
const UaKeyValuePairs fileHeader 
)
static

Saves the PubSub configuration to an OPC UA Binary encoded file.

The contend of the file is the UABinaryFileDataType UA binary encoded as ExtensionObject where the body of the UABinaryFileDataType is a UA binar encoded PubSubConfigurationDataType structure.

Parameters
[in]sConfigurationFilePath and name of PubSub configuration file
[in]pConfigurationConfiguration structure to save
[in]namespacesNamespaces for the configuration structure to save
[in]structureDataTypesThe description of structure DataTypes used by the configuration
[in]enumDataTypesThe description of enumeration DataTypes used by the configuration
[in]simpleDataTypesThe description of simple DataTypes used by the configuration
[in]schemaLocationLocation of the schema file with the data types used for the configuration
[in]fileHeaderAdditional header fields for the configuration
UaStatus PubSubBase::PubSubConfiguration::saveConfiguration ( UaByteString bsConfiguration,
OpcUa_PubSubConfigurationDataType *  pConfiguration,
const UaStringArray namespaces 
)
static

Saves the PubSub configuration to a binary blob.

Parameters
[out]bsConfigurationThe UaByteString to store the config to
[in]pConfigurationConfiguration structure to save
[in]namespacesNamespaces for the configuration structure to save
UaString PubSubBase::PubSubConfiguration::schemaLocation ( ) const

Returns the schema location used by the configuration.

The schema location is part of the UABinaryFileDataType used as container for the PubSubConfiguration. It provides the schema header with namespaces and descriptions of data types used in the PubSubConfiguration.

The schema location is the reference to a file that contains the DataTypeSchemaHeader for the content of the UABinaryFileDataType. The schemaLocation is either a fully qualified URL or a URN which is a relative path to the file location. If the schemaLocation is provided, the DataType descriptions can be skipped but the namespaces used shall match the namespaces in the schema file.

void PubSubBase::PubSubConfiguration::setEnumDataTypes ( const UaEnumDescriptions enumDataTypes)

Sets the description of enumeration DataTypes used by the configuration.

The DataTypes are part of the UABinaryFileDataType used as container for the PubSubConfiguration. It provides the schema header with namespaces and descriptions of data types used in the PubSubConfiguration.

void PubSubBase::PubSubConfiguration::setFileHeader ( const UaKeyValuePairs fileHeader)

Sets the additional header fields for the configuration.

The header fields are part of the UABinaryFileDataType used as container for the PubSubConfiguration. It provides the schema header with namespaces and descriptions of data types used in the PubSubConfiguration.

void PubSubBase::PubSubConfiguration::setNamespaceTable ( const UaStringArray namespaces)

Sets the namespace table used by the configuration.

The index into the array is referred to as NamespaceIndex. The NamespaceIndex is used in NodeIds and QualifiedNames, rather than the longer namespace URI. NamespaceIndex 0 is reserved for the OPC UA namespace and it is not included in this array.

Parameters
[in]namespacesNew namespace array for the namespace table
void PubSubBase::PubSubConfiguration::setSchemaLocation ( const UaString schemaLocation)

Sets the schema location used by the configuration.

The schema location is part of the UABinaryFileDataType used as container for the PubSubConfiguration. It provides the schema header with namespaces and descriptions of data types used in the PubSubConfiguration.

The schema location is the reference to a file that contains the DataTypeSchemaHeader for the content of the UABinaryFileDataType. The schemaLocation is either a fully qualified URL or a URN which is a relative path to the file location. If the schemaLocation is provided, the DataType descriptions can be skipped but the namespaces used shall match the namespaces in the schema file.

void PubSubBase::PubSubConfiguration::setSimpleDataTypes ( const UaSimpleTypeDescriptions simpleDataTypes)

Sets the description of simple DataTypes used by the configuration.

The DataTypes are part of the UABinaryFileDataType used as container for the PubSubConfiguration. It provides the schema header with namespaces and descriptions of data types used in the PubSubConfiguration.

void PubSubBase::PubSubConfiguration::setStructureDataTypes ( const UaStructureDescriptions structureDataTypes)

Sets the description of structure DataTypes used by the configuration.

The DataTypes are part of the UABinaryFileDataType used as container for the PubSubConfiguration. It provides the schema header with namespaces and descriptions of data types used in the PubSubConfiguration.

UaSimpleTypeDescriptions PubSubBase::PubSubConfiguration::simpleDataTypes ( )

Returns the description of simple DataTypes used by the configuration.

The DataTypes are part of the UABinaryFileDataType used as container for the PubSubConfiguration. It provides the schema header with namespaces and descriptions of data types used in the PubSubConfiguration.

UaStructureDescriptions PubSubBase::PubSubConfiguration::structureDataTypes ( ) const

Returns the description of structure DataTypes used by the configuration.

The DataTypes are part of the UABinaryFileDataType used as container for the PubSubConfiguration. It provides the schema header with namespaces and descriptions of data types used in the PubSubConfiguration.


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