![]() |
C++ Based OPC UA Client/Server/PubSub SDK
1.7.6.537
|
Management object for WriterGroups. More...
#include <writergroup.h>
Inherits PubSubBase::PubSubGroup.
Public Member Functions | |
UaStatus | startUp () |
Start up the WriterGroup object. | |
UaStatus | shutDown () |
Shut down the WriterGroup object. | |
OpcUa_MessageSecurityMode | securityMode () const |
Returns the security mode setting for the WriterGroup. | |
void | setSecurityMode (OpcUa_MessageSecurityMode securityMode) |
Set the security mode for the WriterGroup. More... | |
UaStatus | transportSettingsDatagram (UaDatagramWriterGroupTransportDataType &datagramTransportSettings) const |
Returns the datagram transport settings structure if a datagram transport is configured. More... | |
UaStatus | setTransportSettingsDatagram (const UaDatagramWriterGroupTransportDataType &datagramTransportSettings) |
Sets the datagram transport settings structure if a datagram transport is configured. More... | |
UaStatus | transportSettingsBroker (UaBrokerWriterGroupTransportDataType &brokerTransportSettings) const |
Returns the broker transport settings structure if a broker transport is configured. More... | |
UaStatus | setTransportSettingsBroker (const UaBrokerWriterGroupTransportDataType &brokerTransportSettings) |
Sets the broker transport settings structure if a broker transport is configured. More... | |
UaStatus | messageSettingsUadp (UaUadpWriterGroupMessageDataType &uadpMessageSettings) const |
Returns the UADP message settings structure if a UADP message mapping is configured. More... | |
UaStatus | setMessageSettingsUadp (const UaUadpWriterGroupMessageDataType &uadpMessageSettings) |
Sets the UADP message settings structure if a UADP message mapping is configured. More... | |
UaStatus | messageSettingsJson (UaJsonWriterGroupMessageDataType &jsonMessageSettings) const |
Returns the JSON message settings structure if a JSON message mapping is configured. More... | |
UaStatus | setMessageSettingsJson (const UaJsonWriterGroupMessageDataType &jsonMessageSettings) |
Sets the JSON message settings structure if a JSON message mapping is configured. More... | |
DataSetWriter * | addDataSetWriter (PublishedDataSet *pPublishedDataSet) |
Adds a DataSetWriter with default settings based on the transportFacet of the WriterGroup and the headerConfiguration. More... | |
DataSetWriter * | addDataSetWriter_UADP (const UaString &name, bool enabled, OpcUa_UInt16 dataSetWriterId, PublishedDataSet *pPublishedDataSet) |
Adds a DataSetWriter with passed settings. | |
DataSetWriter * | addDataSetWriter (const UaDataSetWriterDataType &dataSetWriter) |
Adds a DataSetWriter with passed configuration structure. More... | |
DataSetWriter * | addDataSetWriter (const OpcUa_DataSetWriterDataType &dataSetWriter) |
Adds a DataSetWriter with passed configuration structure. More... | |
OpcUa_UInt32 | dataSetWriterCount () const |
Returns the number of DataSetReaders. | |
DataSetWriter * | getDataSetWriter (OpcUa_UInt32 index) |
Returns the DataSetWriter at index or NULL if index is outside the valid range. | |
UaStatus | removeDataSetWriter (DataSetWriter *pDataSetWriter) |
Removes the passed DataSetWriter. | |
UaStatus | calculateNetworkMessageHeaderSize (OpcUa_UInt16 &size, bool &isFixedSize) |
Calculate size of the NetworkMessage header. More... | |
UaStatus | calculateNetworkMessageSize (OpcUa_UInt32 &size, bool &isFixedSize) |
Calculate size of the NetworkMessage header. More... | |
UaStatus | calculateDataSetMessageOffset (DataSetWriter *pDataSetWriter, OpcUa_UInt16 &networkMessageNumber, OpcUa_UInt16 &offset) |
Calculate NetworkMessage number and offset for the DataSetMessage in the the NetworkMessage. More... | |
OpcUa_StatusCode | sample () |
Create the network messages for the WriterGroup in a publishing interval. | |
OpcUa_StatusCode | publish () |
Send the network messages for the WriterGroup in a publishing interval. | |
![]() | |
PubSubGroup (PubSubResources *pPubSubResources, TransportFacet transportFacet, ConfigurationState configurationState) | |
Creates an instance of the PubSubGroup. | |
![]() | |
PubSubObject (PubSubResources *pPubSubResources, TransportFacet transportFacet, ConfigurationState configurationState) | |
Creates an instance of the PubSubObject. | |
UaMutex * | pConfigMutex () 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. | |
![]() | |
ReferenceCounter () | |
construction | |
virtual | ~ReferenceCounter () |
destruction | |
Protected Member Functions | |
WriterGroup (PubSubConnection *pParent, OpcUa_WriterGroupDataType *pConfigData, OpcUa_UInt32 configIndex, OpcUa_Int32 stackHandle) | |
Creates an instance of the WriterGroup from central configuration structure tree. More... | |
WriterGroup (PubSubConnection *pParent, OpcUa_WriterGroupDataType *pConfigData) | |
Creates an instance of the WriterGroup with new structure. More... | |
virtual | ~WriterGroup () |
Destroys the WriterGroup object. | |
![]() | |
virtual | ~PubSubGroup () |
Destroys the PubSubGroup object. | |
![]() | |
virtual | ~PubSubObject () |
Destroys the PubSubObject object. | |
Additional Inherited Members | |
![]() | |
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... | |
Management object for WriterGroups.
|
protected |
Creates an instance of the WriterGroup from central configuration structure tree.
[in] | pParent | Parent connection |
[in] | pConfigData | Configuration structure for the WriterGroup |
[in] | configIndex | Index of the structure in the list of writer groups in a connection |
[in] | stackHandle | Handle of the WriterGroup in the stack. PUBSUB_INVALID_STACKHANDLE if no corresponding stack object exists. |
|
protected |
Creates an instance of the WriterGroup with new structure.
[in] | pParent | Parent connection |
[in] | pConfigData | Configuration structure for the WriterGroup |
DataSetWriter * PubSubBase::WriterGroup::addDataSetWriter | ( | PublishedDataSet * | pPublishedDataSet | ) |
Adds a DataSetWriter with default settings based on the transportFacet of the WriterGroup and the headerConfiguration.
The transportFacet of the WriterGroup affects the TransportSettings and the MessageSettings The headerConfiguration of the WriterGroup affects DataSetFieldContentMask and DataSetMessageContentMask if it is not set to custom. Initial value for KeyFrameCount is 1.
DataSetWriter * PubSubBase::WriterGroup::addDataSetWriter | ( | const UaDataSetWriterDataType & | dataSetWriter | ) |
Adds a DataSetWriter with passed configuration structure.
[in] | dataSetWriter | DataSetWriter configuration structure |
DataSetWriter * PubSubBase::WriterGroup::addDataSetWriter | ( | const OpcUa_DataSetWriterDataType & | dataSetWriter | ) |
Adds a DataSetWriter with passed configuration structure.
If the settings do not match the header layout of the WriterGroup, these settings are adjusted to match the required settings for the WriterGroup.
[in] | dataSetWriter | DataSetWriter configuration structure |
UaStatus PubSubBase::WriterGroup::calculateDataSetMessageOffset | ( | DataSetWriter * | pDataSetWriter, |
OpcUa_UInt16 & | networkMessageNumber, | ||
OpcUa_UInt16 & | offset | ||
) |
Calculate NetworkMessage number and offset for the DataSetMessage in the the NetworkMessage.
The calculation fails if the offset is not at a fixed position.
[in] | pDataSetWriter | DataSetWriter in the WriterGroup the calculation is executed for |
[out] | networkMessageNumber | The number of the NetworkMessage inside a PublishingInterval in which this DataSetMessage is published |
[out] | offset | Offset in bytes for the DataSetMessage inside the corresponding NetworkMessage relative to the beginning of the NetworkMessage |
UaStatus PubSubBase::WriterGroup::calculateNetworkMessageHeaderSize | ( | OpcUa_UInt16 & | size, |
bool & | isFixedSize | ||
) |
Calculate size of the NetworkMessage header.
[out] | size | Calculated size of the NetworkMessage header |
[out] | isFixedSize | Flag indicating if the size is fixed or if it can exceed the calculated size |
UaStatus PubSubBase::WriterGroup::calculateNetworkMessageSize | ( | OpcUa_UInt32 & | size, |
bool & | isFixedSize | ||
) |
Calculate size of the NetworkMessage header.
[out] | size | Calculated size of the NetworkMessage |
[out] | isFixedSize | Flag indicating if the size is fixed or if it can exceed the calculated size |
UaStatus PubSubBase::WriterGroup::messageSettingsJson | ( | UaJsonWriterGroupMessageDataType & | jsonMessageSettings | ) | const |
Returns the JSON message settings structure if a JSON message mapping is configured.
Returns BadInvalidState if another message mapping is configured< [out] JSON message settings structure
UaStatus PubSubBase::WriterGroup::messageSettingsUadp | ( | UaUadpWriterGroupMessageDataType & | uadpMessageSettings | ) | const |
Returns the UADP message settings structure if a UADP message mapping is configured.
Returns BadInvalidState if another message mapping is configured< [out] UADP message settings structure
UaStatus PubSubBase::WriterGroup::setMessageSettingsJson | ( | const UaJsonWriterGroupMessageDataType & | jsonMessageSettings | ) |
Sets the JSON message settings structure if a JSON message mapping is configured.
Returns BadInvalidState if another message mapping is configured
UaStatus PubSubBase::WriterGroup::setMessageSettingsUadp | ( | const UaUadpWriterGroupMessageDataType & | uadpMessageSettings | ) |
Sets the UADP message settings structure if a UADP message mapping is configured.
Returns BadInvalidState if another message mapping is configured
Returns BadInvalidArgument if the UadpNetworkMessageContentMask does not match the header layout setting For UADP-Periodic-Fixed the flags for PublisherId, GroupHeader, WriterGroupId, GroupVersion, NetworkMessageNumber and SequenceNumber must be set. For UADP-Dynamic the flags for PublisherId and PayloadHeader must be set.
void PubSubBase::WriterGroup::setSecurityMode | ( | OpcUa_MessageSecurityMode | securityMode | ) |
Set the security mode for the WriterGroup.
If the security mode is None, the SecurityGroupId and the SecurityKeyServices are set to null.
If the security mode is Invalid, it is set to None.
UaStatus PubSubBase::WriterGroup::setTransportSettingsBroker | ( | const UaBrokerWriterGroupTransportDataType & | brokerTransportSettings | ) |
Sets the broker transport settings structure if a broker transport is configured.
Returns BadInvalidState if another transport mapping is configured
UaStatus PubSubBase::WriterGroup::setTransportSettingsDatagram | ( | const UaDatagramWriterGroupTransportDataType & | datagramTransportSettings | ) |
Sets the datagram transport settings structure if a datagram transport is configured.
Returns BadInvalidArgument if another transport mapping is configured
UaStatus PubSubBase::WriterGroup::transportSettingsBroker | ( | UaBrokerWriterGroupTransportDataType & | brokerTransportSettings | ) | const |
Returns the broker transport settings structure if a broker transport is configured.
Returns BadInvalidState if another transport mapping is configured< [out] Broker transport settings structure
UaStatus PubSubBase::WriterGroup::transportSettingsDatagram | ( | UaDatagramWriterGroupTransportDataType & | datagramTransportSettings | ) | const |
Returns the datagram transport settings structure if a datagram transport is configured.
Returns BadInvalidState if another transport mapping is configured< [out] Datagram transport settings structure