![]() |
Diffusion C API 6.11.5
|
Value stream related callback functions. More...
Data Structures | |
struct | value_stream_s |
Typedefs | |
typedef int(* | value_stream_on_subscription) (const char *const topic_path, const TOPIC_SPECIFICATION_T *specification, void *context) |
Callback for subscription. | |
typedef int(* | value_stream_on_unsubscription) (const char *const topic_path, const TOPIC_SPECIFICATION_T *specification, NOTIFY_UNSUBSCRIPTION_REASON_T reason, void *context) |
Callback for unsubscription. | |
typedef int(* | value_stream_on_value) (const char *const topic_path, const TOPIC_SPECIFICATION_T *specification, DIFFUSION_DATATYPE datatype, const DIFFUSION_VALUE_T *old_value, const DIFFUSION_VALUE_T *new_value, void *context) |
Callback for when a value has been received for the topic. | |
typedef void(* | value_stream_on_close) (void) |
Callback for when a value stream has been closed. | |
typedef void(* | value_stream_on_error) (const DIFFUSION_ERROR_T *error) |
Callback for when a value stream has encountered an error. | |
Value stream related callback functions.
typedef void(* value_stream_on_error) (const DIFFUSION_ERROR_T *error) |
Callback for when a value stream has encountered an error.
error | containing the error code and description of the error. The context to this will be the value stream's context. |
typedef int(* value_stream_on_subscription) (const char *const topic_path, const TOPIC_SPECIFICATION_T *specification, void *context) |
Callback for subscription.
topic_path | the path of the topic subscribed to |
specification | the specification of the topic |
context | user-supplied context from the initial add_topic_from_specification call. |
HANDLER_SUCCESS
or HANDLER_FAILURE
. typedef int(* value_stream_on_unsubscription) (const char *const topic_path, const TOPIC_SPECIFICATION_T *specification, NOTIFY_UNSUBSCRIPTION_REASON_T reason, void *context) |
Callback for unsubscription.
topic_path | the path of the topic subscribed to |
specification | the specification of the topic |
reason | the unsubscription reason |
context | user-supplied context from the initial add_topic_from_specification call. |
HANDLER_SUCCESS
or HANDLER_FAILURE
. typedef int(* value_stream_on_value) (const char *const topic_path, const TOPIC_SPECIFICATION_T *specification, DIFFUSION_DATATYPE datatype, const DIFFUSION_VALUE_T *old_value, const DIFFUSION_VALUE_T *new_value, void *context) |
Callback for when a value has been received for the topic.
topic_path | the path of the topic subscribed to |
specification | the specification of the topic |
datatype | the value stream datatype |
old_value | the previous value for topic. Will be null for the initial call to on_value for a topic. It can also be null if the topic's data type supports null values. This value is intended to be called with its corresponding datatype value reader. i.e read_diffusion_string_value , read_diffusion_binary_value , read_diffusion_int64_value , etc. |
new_value | the new value derived from the last update received from the server. It can be null if the topic's data type supports null values. This value is intended to be called with its corresponding datatype value reader. i.e read_diffusion_string_value , read_diffusion_binary_value , read_diffusion_int64_value , etc. |
context | User-supplied context from the initial add_topic_from_specification call. |
HANDLER_SUCCESS
or HANDLER_FAILURE
.