C++ Based OPC UA Client/Server/PubSub SDK  1.7.6.537
PubSubBase::DataSetWriterCallback Class Referenceabstract

Callback class for the DataSetWriter. More...

#include <datasetwritercallback.h>

Public Member Functions

virtual OpcUa_StatusCode startUpWriter (PubSubBase::DataSetWriter *pDataSetWriter)=0
 Callback informing the application about the start up of the DataSetWriter. More...
 
virtual void stateChange (PubSubBase::DataSetWriter *pDataSetWriter, OpcUa_PubSubState newState)
 Callback informing the application about a state change of the DataSetWriter. More...
 
virtual OpcUa_StatusCode shutDownWriter (PubSubBase::DataSetWriter *pDataSetWriter)=0
 Callback informing the application about the shut down of the DataSetWriter. More...
 
virtual OpcUa_StatusCode writeDataSetMessageFields (PubSubBase::DataSetWriter *pDataSetWriter, struct ua_encoder_context *pEncoder, struct pubsub_datasetmsg_ctx *pDataSetMessageContext)=0
 Callback for encoding the fields of a new DataSetMessage before sending. More...
 

Detailed Description

Callback class for the DataSetWriter.

Member Function Documentation

virtual OpcUa_StatusCode PubSubBase::DataSetWriterCallback::shutDownWriter ( PubSubBase::DataSetWriter pDataSetWriter)
pure virtual

Callback informing the application about the shut down of the DataSetWriter.

The application is not allowed to call any methods on the PubSubModule if this method call is returned.

Parameters
[in]pDataSetWriterThe affected DataSetWriter
virtual OpcUa_StatusCode PubSubBase::DataSetWriterCallback::startUpWriter ( PubSubBase::DataSetWriter pDataSetWriter)
pure virtual

Callback informing the application about the start up of the DataSetWriter.

Parameters
[in]pDataSetWriterThe affected DataSetWriter
void PubSubBase::DataSetWriterCallback::stateChange ( PubSubBase::DataSetWriter pDataSetWriter,
OpcUa_PubSubState  newState 
)
virtual

Callback informing the application about a state change of the DataSetWriter.

Parameters
[in]pDataSetWriterThe affected DataSetWriter
[in]newStateThe new state of the affected DataSetWriter
virtual OpcUa_StatusCode PubSubBase::DataSetWriterCallback::writeDataSetMessageFields ( PubSubBase::DataSetWriter pDataSetWriter,
struct ua_encoder_context *  pEncoder,
struct pubsub_datasetmsg_ctx *  pDataSetMessageContext 
)
pure virtual

Callback for encoding the fields of a new DataSetMessage before sending.

The application is responsible for writing the field count and the field data. The DataSetMessage header is already filled by the SDK.

The out parameter pDataSetMessageContext allows to influence the header to set the timestamp, handle error cases or to change the message type between messages.

Parameters
[in]pDataSetWriterThe affected DataSetWriter
[in]pEncoderThe encoder object used to write the DataSetMessage fields into the payload.
[in,out]pDataSetMessageContextContext and header fields for the DataSetMessage.
The fields minor_version, major_version, sequence_number, type and encoding are set by the caller.
The fields ts, status and valid must be set by the method implementation.
  • ts: Timestamp of the DataSetMessage.
  • status: The overall status of the DataSetMessage as severity and sub code. ua_statuscode_get_code_to_uint16 can convert a StatusCode to a UInt16 value that contains only severity and sub code
  • valid: Flag indicating if the DataSetMessage is valid
  • type: Type of the written DataSetMessage. The type is set my the caller but may be modified by the implementation in case of Event or Data Delta Frames. The type is a bit mask indicating the type of the written DataSetMessage.
    The bit range 0-3 indicates the DataSetMessage type listed in the following table
    Bit Values Description
    0000 Data Key Frame
    0001 Data Delta Frame
    0010 Event
    0011 Keep Alive
    Bit 4 indicates if more events are available if the type is Event.

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