Diffusion C API
6.8.0
|
Copyright © 2018, 2021 Push Technology Ltd., All Rights Reserved. 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. More... | |
typedef int(* | value_stream_on_unsubscription )(const char *const topic_path, const TOPIC_SPECIFICATION_T *const specification, NOTIFY_UNSUBSCRIPTION_REASON_T reason, void *context) |
Callback for unsubscription. More... | |
typedef int(* | value_stream_on_value )(const char *const topic_path, const TOPIC_SPECIFICATION_T *const specification, DIFFUSION_DATATYPE datatype, const DIFFUSION_VALUE_T *const old_value, const DIFFUSION_VALUE_T *const new_value, void *context) |
Callback for when a value has been received for the topic. More... | |
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. More... | |
Copyright © 2018, 2021 Push Technology Ltd., All Rights Reserved.
Use is subject to license terms.
NOTICE: All information contained herein is, and remains the property of Push Technology. The intellectual and technical concepts contained herein are proprietary to Push Technology and may be covered by U.S. and Foreign Patents, patents in process, and are protected by trade secret or copyright law.
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 *const 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 *const specification, DIFFUSION_DATATYPE datatype, const DIFFUSION_VALUE_T *const old_value, const DIFFUSION_VALUE_T *const 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
.