Class managing PubSub resources like stack and configurations.
More...
#include <pubsubresources.h>
Inherits ReferenceCounter, and UaThread.
Class managing PubSub resources like stack and configurations.
UaStatus PubSubBase::PubSubResources::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] | sConfigurationFile | Path and name of PubSub configuration file |
[in] | initializeStack | Flag indicating if the PubSub stack should be initialized with the configuration for communication |
UaStatus PubSubBase::PubSubResources::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] | bsConfiguration | Content of the PubSub configuration file |
[in] | initializeStack | Flag indicating if the PubSub stack should be initialized with the configuration for communication |
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] | namespaceTable | Namespace table for the PubSub configuration structure |
[in] | pubSubConfiguration | PubSub configuration as structure |
[in] | initializeStack | Flag indicating if the PubSub stack should be initialized with the configuration for communication |
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] | newNamespaceTable | New namespace array for the namespace table |
void PubSubBase::PubSubResources::run |
( |
| ) |
|
|
protectedvirtual |
Main function of the thread.
Must be implemented by the derived class to execute the functionality
Implements UaThread.
UaStatus PubSubBase::PubSubResources::saveConfiguration |
( |
const UaString & |
sConfigurationFile | ) |
|
Saves the PubSub configuration to a OPC UA Binary encoded file.
- Parameters
-
[in] | sConfigurationFile | Path and name of PubSub configuration file |
Saves the PubSub configuration to a binary blob.
- Parameters
-
Saves the PubSub configuration to a PubSubConfigurationDataType.
- Parameters
-
[out] | namespaceTable | Namespace table for the PubSub configuration structure |
[out] | pubSubConfiguration | PubSub configuration as structure |
UaStatus PubSubBase::PubSubResources::saveConfiguration |
( |
const UaString & |
sConfigurationFile, |
|
|
OpcUa_PubSubConfigurationDataType * |
pConfiguration, |
|
|
const UaStringArray & |
namespaces |
|
) |
| |
|
static |
Saves the PubSub configuration to a OPC UA Binary encoded file.
- Parameters
-
[in] | sConfigurationFile | Path and name of PubSub configuration file |
[in] | pConfiguration | Configuration structure to save |
[in] | namespaces | Namespaces for the configuration structure to save |
UaStatus PubSubBase::PubSubResources::saveConfiguration |
( |
UaByteString & |
bsConfiguration, |
|
|
OpcUa_PubSubConfigurationDataType * |
pConfiguration, |
|
|
const UaStringArray & |
namespaces |
|
) |
| |
|
static |
Saves the PubSub configuration to a binary blob.
- Parameters
-
[out] | bsConfiguration | The UaByteString to store the config to |
[in] | pConfiguration | Configuration structure to save |
[in] | namespaces | Namespaces for the configuration structure to save |
void PubSubBase::PubSubResources::setNamespaces |
( |
const UaStringArray & |
namespaces | ) |
|
Sets the namespaces 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] | namespaces | New namespace array for the namespace table |
The documentation for this class was generated from the following files:
- C:/work/uasdkcpp/src/uabase/pubsubbasecpp/pubsubresources.h
- C:/work/uasdkcpp/src/uabase/pubsubbasecpp/pubsubresources.cpp