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

Callback class for the DataSetReader. More...

#include <datasetreadercallback.h>

Inherited by PubSubServer::DataSetDispatcher.

Public Member Functions

virtual OpcUa_StatusCode startUpReader (PubSubBase::DataSetReader *pDataSetReader)=0
 Callback informing the application about the start up of the PubSub module in the server SDK. More...
 
virtual void stateChange (PubSubBase::DataSetReader *pDataSetReader, OpcUa_PubSubState newState)
 Callback informing the application about a state change of the DataSetReader. More...
 
virtual OpcUa_StatusCode shutDownReader (PubSubBase::DataSetReader *pDataSetReader)=0
 Callback informing the application about the shut down of the PubSub module in the server SDK. More...
 
virtual OpcUa_StatusCode newMessageReceived (PubSubBase::DataSetReader *pDataSetReader, struct ua_decoder_context *pDecoder, struct pubsub_datasetmsg_ctx *pDataSetMessageContext)=0
 Callback informing about a new message received for a DataSetReader. More...
 
virtual void newDataInQueue (PubSubBase::DataSetReader *pDataSetReader, OpcUa_UInt16 status, ua_datetime timestamp)
 Callback informing about new data in the queue. More...
 

Detailed Description

Callback class for the DataSetReader.

Member Function Documentation

void PubSubBase::DataSetReaderCallback::newDataInQueue ( PubSubBase::DataSetReader pDataSetReader,
OpcUa_UInt16  status,
ua_datetime  timestamp 
)
virtual

Callback informing about new data in the queue.

This callback is used if the application takes the values from a value queue filled by the PubSubstack when a received message is decoded by the PubSub stack

The method should not block

Parameters
[in]pDataSetReaderThe affected DataSetReader
[in]statusThe overall status of the DataSetMessage
[in]timestampThe timestamp of the DataSetMessage.

Reimplemented in PubSubServer::DataSetDispatcher.

virtual OpcUa_StatusCode PubSubBase::DataSetReaderCallback::newMessageReceived ( PubSubBase::DataSetReader pDataSetReader,
struct ua_decoder_context *  pDecoder,
struct pubsub_datasetmsg_ctx *  pDataSetMessageContext 
)
pure virtual

Callback informing about a new message received for a DataSetReader.

This callback ist used if the application decodes the received message.

The method should not block

Parameters
[in]pDataSetReaderThe affected DataSetReader
[in]pDecoderThe decoder object used to read the DataSetMessage fields from the message payload.
[in,out]pDataSetMessageContextContext and header fields for the DataSetMessage.
The following fields are contained in the structure
  • ts: Timestamp of the DataSetMessage.
  • status: The overall status of the DataSetMessage as severity and sub code. ua_statuscode_from_uint16_code can convert the UInt16 value to a StatusCode
  • valid: Flag indicating if the DataSetMessage is valid
  • sequence_number: Sequence number of the received DataSetMessage
  • minor_version: Minor version for the received message based on DataSetMetaData of the sender
  • major_version Major version for the received message based on DataSetMetaData of the sender
  • type: Type of the DataSetMessage. The type is a bit mask indicating the type of the 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

Implemented in PubSubServer::DataSetDispatcher.

virtual OpcUa_StatusCode PubSubBase::DataSetReaderCallback::shutDownReader ( PubSubBase::DataSetReader pDataSetReader)
pure virtual

Callback informing the application about the shut down of the PubSub module in the server SDK.

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

Parameters
[in]pDataSetReaderThe affected DataSetReader

Implemented in PubSubServer::DataSetDispatcher.

virtual OpcUa_StatusCode PubSubBase::DataSetReaderCallback::startUpReader ( PubSubBase::DataSetReader pDataSetReader)
pure virtual

Callback informing the application about the start up of the PubSub module in the server SDK.

Parameters
[in]pDataSetReaderThe affected DataSetReader

Implemented in PubSubServer::DataSetDispatcher.

void PubSubBase::DataSetReaderCallback::stateChange ( PubSubBase::DataSetReader pDataSetReader,
OpcUa_PubSubState  newState 
)
virtual

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

Parameters
[in]pDataSetReaderThe affected DataSetReader
[in]newStateThe new state of the affected DataSetReader

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