Callback class for the DataSetWriter.
More...
#include <datasetwritercallback.h>
Callback class for the DataSetWriter.
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
-
Callback informing the application about the start up of the DataSetWriter.
- Parameters
-
void PubSubBase::DataSetWriterCallback::stateChange |
( |
PubSubBase::DataSetWriter * |
pDataSetWriter, |
|
|
OpcUa_PubSubState |
newState |
|
) |
| |
|
virtual |
Callback informing the application about a state change of the DataSetWriter.
- Parameters
-
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] | pDataSetWriter | The affected DataSetWriter |
[in] | pEncoder | The encoder object used to write the DataSetMessage fields into the payload. |
[in,out] | pDataSetMessageContext | Context 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:
- C:/work/uasdkcpp/src/uabase/pubsubbasecpp/datasetwritercallback.h
- C:/work/uasdkcpp/src/uabase/pubsubbasecpp/datasetwriter.cpp