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...
 
PublishedDataSetpPublishedDataSet () 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.
 
WriterQueueItemgetQueueItem (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...
 
- 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
 

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.
 
- 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 object for DataSetWriters.

Constructor & Destructor Documentation

PubSubBase::DataSetWriter::DataSetWriter ( WriterGroup pParent,
OpcUa_DataSetWriterDataType *  pConfigData,
OpcUa_UInt32  configIndex,
OpcUa_Int32  stackHandle,
PublishedDataSet pPublishedDataSet 
)
protected

Creates an instance of the DataSetWriter from central configuration structure tree.

Parameters
[in]pParentParent group
[in]pConfigDataConfiguration structure for the DataSetWriter
[in]configIndexIndex of the structure in the list of DataSet writers in a group
[in]stackHandleHandle of the WriterGroup in the stack. PUBSUB_INVALID_STACKHANDLE if no corresponding stack object exists.
[in]pPublishedDataSetPublishedDataSet for this DataSetWriter
PubSubBase::DataSetWriter::DataSetWriter ( WriterGroup pParent,
OpcUa_DataSetWriterDataType *  pConfigData,
PublishedDataSet pPublishedDataSet 
)
protected

Creates an instance of the DataSetWriter with new structure.

Parameters
[in]pParentParent group
[in]pConfigDataConfiguration structure for the DataSetWriter

Member Function Documentation

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.

Parameters
[out]sizeCalculated size of the DataSetMessage
[out]isFixedSizeFlag 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.

Parameters
[in]indexIndex 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.

Parameters
[in]dataSetFieldContentMaskDataSetFieldContentMask to set
void PubSubBase::DataSetWriter::setDataSetWriterCallback ( DataSetWriterCallback pDataSetWriterCallback)

Set the callback for application specific message encoding.

Parameters
[in]pDataSetWriterCallbackCallback interface
void PubSubBase::DataSetWriter::setDataSetWriterId ( OpcUa_UInt16  dataSetWriterId)

Sets the DataSetWriter DataSetWriterId setting.

Parameters
[in]dataSetWriterIdDataSetWriterId to set
void PubSubBase::DataSetWriter::setDataSetWriterProperties ( const UaKeyValuePairs dataSetWriterProperties)

Sets the DataSetWriter Properties as KeyValuePair list.

Parameters
[in]dataSetWriterPropertiesDataSetWriter Properties as KeyValuePair list
void PubSubBase::DataSetWriter::setEnabled ( bool  bEnabled)

Sets the Enabled state of the DataSetWriter.

Parameters
[in]bEnabledEnabled state to set
void PubSubBase::DataSetWriter::setKeyFrameCount ( OpcUa_UInt32  keyFrameCount)

Sets the DataSetWriter KeyFrameCount setting.

Parameters
[in]keyFrameCountKeyFrameCount 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

Parameters
[in]jsonMessageSettingsJSON 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.

Parameters
[in]uadpMessageSettingsUADP message settings structure
void PubSubBase::DataSetWriter::setName ( const UaString name)

Sets the Name of the DataSetWriter.

Parameters
[in]nameName to set
void PubSubBase::DataSetWriter::setPublishedDataSet ( PublishedDataSet pPublishedDataSet)

Set the PublishedDataSet for the DataSetWriter.

Parameters
[in]pPublishedDataSetManagement 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


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