![]() |
C++ Based OPC UA Client/Server/PubSub SDK
1.7.6.537
|
Management object for DataSetWriters. More...
#include <datasetwriter.h>
Inherits PubSubBase::PubSubObject.
Public Member Functions | |
UaStatus | startUp () |
Start up the DataSetWriter object. | |
UaStatus | shutDown () |
Shut down the DataSetWriter object. | |
UaString | name () const |
Returns the DataSetWriter Name. | |
void | setName (const UaString &name) |
Sets the Name of the DataSetWriter. More... | |
bool | enabled () const |
Returns the Enabled state of the DataSetWriter. | |
void | setEnabled (bool bEnabled) |
Sets the Enabled state of the DataSetWriter. More... | |
OpcUa_UInt16 | dataSetWriterId () const |
Returns the DataSetWriter DataSetWriterId setting. | |
void | setDataSetWriterId (OpcUa_UInt16 dataSetWriterId) |
Sets the DataSetWriter DataSetWriterId setting. More... | |
OpcUa_DataSetFieldContentMask | dataSetFieldContentMask () const |
Returns the DataSetWriter DataSetFieldContentMask setting. | |
UaStatus | setDataSetFieldContentMask (OpcUa_DataSetFieldContentMask dataSetFieldContentMask) |
Sets the DataSetWriter DataSetFieldContentMask setting. More... | |
OpcUa_UInt32 | keyFrameCount () const |
Returns the DataSetWriter KeyFrameCount setting. | |
void | setKeyFrameCount (OpcUa_UInt32 keyFrameCount) |
Sets the DataSetWriter KeyFrameCount setting. More... | |
PublishedDataSet * | pPublishedDataSet () const |
Returns the PublishedDataSet assigned to the DataSetWriter. | |
void | setPublishedDataSet (PublishedDataSet *pPublishedDataSet) |
Set the PublishedDataSet for the DataSetWriter. More... | |
UaKeyValuePairs | dataSetWriterProperties () const |
Returns the DataSetWriter Properties as KeyValuePair list. | |
void | setDataSetWriterProperties (const UaKeyValuePairs &dataSetWriterProperties) |
Sets the DataSetWriter Properties as KeyValuePair list. More... | |
UaStatus | transportSettingsBroker (UaBrokerDataSetWriterTransportDataType &brokerTransportSettings) const |
Returns the broker transport settings structure if a broker transport is configured. More... | |
UaStatus | setTransportSettingsBroker (const UaBrokerDataSetWriterTransportDataType &brokerTransportSettings) |
Sets the broker transport settings structure if a broker transport is configured. More... | |
UaStatus | messageSettingsUadp (UaUadpDataSetWriterMessageDataType &uadpMessageSettings) const |
Returns the UADP message settings structure if a UADP message mapping is configured. More... | |
UaStatus | setMessageSettingsUadp (const UaUadpDataSetWriterMessageDataType &uadpMessageSettings) |
Sets the UADP message settings structure if a UADP message mapping is configured. More... | |
UaStatus | messageSettingsJson (UaJsonDataSetWriterMessageDataType &jsonMessageSettings) const |
Returns the JSON message settings structure if a JSON message mapping is configured. More... | |
UaStatus | setMessageSettingsJson (const UaJsonDataSetWriterMessageDataType &jsonMessageSettings) |
Sets the JSON message settings structure if a JSON message mapping is configured. More... | |
OpcUa_PublishedDataItemsDataType * | pPublishedDataItems () |
Returns PublishedDataItemsDataType structure if DataSet is based on data items or NULL otherwise. More... | |
OpcUa_UInt32 | getQueueSize () const |
Returns number of WriterQueueItems. | |
WriterQueueItem * | getQueueItem (OpcUa_UInt32 index) |
Returns WriterQueueItem for index or NULL if index is invalid. More... | |
void | setDataSetWriterCallback (DataSetWriterCallback *pDataSetWriterCallback) |
Set the callback for application specific message encoding. More... | |
UaStatus | calculateDataSetSize (OpcUa_UInt16 &size, bool &isFixedSize) |
Calculate size of the DataSetMessage. More... | |
![]() | |
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 | |
DataSetWriter (WriterGroup *pParent, OpcUa_DataSetWriterDataType *pConfigData, OpcUa_UInt32 configIndex, OpcUa_Int32 stackHandle, PublishedDataSet *pPublishedDataSet) | |
Creates an instance of the DataSetWriter from central configuration structure tree. More... | |
DataSetWriter (WriterGroup *pParent, OpcUa_DataSetWriterDataType *pConfigData, PublishedDataSet *pPublishedDataSet) | |
Creates an instance of the DataSetWriter with new structure. More... | |
virtual | ~DataSetWriter () |
Destroys the DataSetWriter 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 DataSetWriters.
|
protected |
Creates an instance of the DataSetWriter from central configuration structure tree.
[in] | pParent | Parent group |
[in] | pConfigData | Configuration structure for the DataSetWriter |
[in] | configIndex | Index of the structure in the list of DataSet writers in a group |
[in] | stackHandle | Handle of the WriterGroup in the stack. PUBSUB_INVALID_STACKHANDLE if no corresponding stack object exists. |
[in] | pPublishedDataSet | PublishedDataSet for this DataSetWriter |
|
protected |
Creates an instance of the DataSetWriter with new structure.
[in] | pParent | Parent group |
[in] | pConfigData | Configuration structure for the DataSetWriter |
UaStatus PubSubBase::DataSetWriter::calculateDataSetSize | ( | OpcUa_UInt16 & | size, |
bool & | isFixedSize | ||
) |
Calculate size of the DataSetMessage.
The size is only fixed if none of the fields has dynamic length and only key frames are generated. The resulting size may be smaller e.g. if an array with a max length is configured but the actual array is smaller.
[out] | size | Calculated size of the DataSetMessage |
[out] | isFixedSize | Flag indicating if the size is fixed or if it can be smaller or bigger than the calculated size |
WriterQueueItem * PubSubBase::DataSetWriter::getQueueItem | ( | OpcUa_UInt32 | index | ) |
Returns WriterQueueItem for index or NULL if index is invalid.
[in] | index | Index of the WriterQueueItem |
UaStatus PubSubBase::DataSetWriter::messageSettingsJson | ( | UaJsonDataSetWriterMessageDataType & | 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::DataSetWriter::messageSettingsUadp | ( | UaUadpDataSetWriterMessageDataType & | 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
OpcUa_PublishedDataItemsDataType * PubSubBase::DataSetWriter::pPublishedDataItems | ( | ) |
Returns PublishedDataItemsDataType structure if DataSet is based on data items or NULL otherwise.
The access to the method and the returned structure must be locked by the caller by using pMutex().
UaStatus PubSubBase::DataSetWriter::setDataSetFieldContentMask | ( | OpcUa_DataSetFieldContentMask | dataSetFieldContentMask | ) |
Sets the DataSetWriter DataSetFieldContentMask setting.
In the header layout is UADP-Periodic-Fixed, the DataSetFieldContentMask must be set to RawData. The method returns BadInvalidArgument if the DataSetFieldContentMask is not RawData in the case of UADP-Periodic-Fixed.
[in] | dataSetFieldContentMask | DataSetFieldContentMask to set |
void PubSubBase::DataSetWriter::setDataSetWriterCallback | ( | DataSetWriterCallback * | pDataSetWriterCallback | ) |
Set the callback for application specific message encoding.
[in] | pDataSetWriterCallback | Callback interface |
void PubSubBase::DataSetWriter::setDataSetWriterId | ( | OpcUa_UInt16 | dataSetWriterId | ) |
Sets the DataSetWriter DataSetWriterId setting.
[in] | dataSetWriterId | DataSetWriterId to set |
void PubSubBase::DataSetWriter::setDataSetWriterProperties | ( | const UaKeyValuePairs & | dataSetWriterProperties | ) |
Sets the DataSetWriter Properties as KeyValuePair list.
[in] | dataSetWriterProperties | DataSetWriter Properties as KeyValuePair list |
void PubSubBase::DataSetWriter::setEnabled | ( | bool | bEnabled | ) |
Sets the Enabled state of the DataSetWriter.
[in] | bEnabled | Enabled state to set |
void PubSubBase::DataSetWriter::setKeyFrameCount | ( | OpcUa_UInt32 | keyFrameCount | ) |
Sets the DataSetWriter KeyFrameCount setting.
[in] | keyFrameCount | KeyFrameCount to set |
UaStatus PubSubBase::DataSetWriter::setMessageSettingsJson | ( | const UaJsonDataSetWriterMessageDataType & | jsonMessageSettings | ) |
Sets the JSON message settings structure if a JSON message mapping is configured.
Returns BadInvalidState if another message mapping is configured
[in] | jsonMessageSettings | JSON message settings structure |
UaStatus PubSubBase::DataSetWriter::setMessageSettingsUadp | ( | const UaUadpDataSetWriterMessageDataType & | 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 UadpDataSetMessageContentMask does not match the header layout setting For UADP-Periodic-Fixed the flags for Status and SequenceNumber must be set. For UADP-Dynamic the flags for Status, SequenceNumber, Timestamp and MinorVersion must be set.
[in] | uadpMessageSettings | UADP message settings structure |
void PubSubBase::DataSetWriter::setName | ( | const UaString & | name | ) |
Sets the Name of the DataSetWriter.
[in] | name | Name to set |
void PubSubBase::DataSetWriter::setPublishedDataSet | ( | PublishedDataSet * | pPublishedDataSet | ) |
Set the PublishedDataSet for the DataSetWriter.
[in] | pPublishedDataSet | Management object for the PublishedDataSet |
UaStatus PubSubBase::DataSetWriter::setTransportSettingsBroker | ( | const UaBrokerDataSetWriterTransportDataType & | brokerTransportSettings | ) |
Sets the broker transport settings structure if a broker transport is configured.
Returns BadInvalidState if another transport mapping is configured
UaStatus PubSubBase::DataSetWriter::transportSettingsBroker | ( | UaBrokerDataSetWriterTransportDataType & | 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