C Device Virtualization API Reference for Oracle Internet of Things Cloud Service Client Software Library. Release 21.1.1.0.0-3. E70343-26
|
The file defines the iot cs device model APIs. More...
Go to the source code of this file.
Structures | |
struct | iotcs_named_value_t |
Change event. More... | |
struct | iotcs_virtual_device_change_event_t |
Change event. More... | |
struct | iotcs_virtual_device_error_event_t |
Change event. More... | |
Typedefs | |
typedef struct iotcs_virtual_device_handle_t * | iotcs_virtual_device_handle |
Device Handle. | |
typedef struct iotcs_named_value_t | iotcs_named_value |
Typedef for iotcs_named_value_t structure. | |
typedef struct iotcs_virtual_device_change_event_t | iotcs_virtual_device_change_event |
Typedef for iotcs_virtual_device_change_event_t structure. | |
typedef struct iotcs_virtual_device_error_event_t | iotcs_virtual_device_error_event |
Typedef for iotcs_virtual_device_error_event_t structure. | |
typedef void(* | iotcs_virtual_device_changed_callback )(iotcs_virtual_device_change_event *event) |
Callback invoked in case of attribute value change. | |
typedef void(* | iotcs_action_callback )(iotcs_virtual_device_handle virtual_device_handle, iotcs_typed_value argument) |
Callback invoked in case of action request. | |
typedef void(* | iotcs_virtual_device_on_action_callback )(iotcs_virtual_device_handle device_handle, char *action, iotcs_named_value *argument) |
Callback invoked in case of action request. | |
typedef void(* | iotcs_virtual_device_error_callback )(iotcs_virtual_device_error_event *event) |
Callback invoked in case of network error in attribute update process. | |
typedef struct iotcs_device_model_handle_t * | iotcs_device_model_handle |
Device Model Handle. | |
typedef struct iotcs_alert_handle_t * | iotcs_alert_handle |
Pointer to Device Alert Handle. | |
typedef struct iotcs_data_handle_t * | iotcs_data_handle |
Pointer to Device Data Handle. | |
Functions | |
iotcs_result | iotcs_get_device_model (const char *device_model, iotcs_device_model_handle *device_model_handle) |
Get device model handle for a given name. | |
const char * | iotcs_get_device_model_name (iotcs_device_model_handle device_model_handle) |
Get device model name. | |
const char * | iotcs_get_device_model_description (iotcs_device_model_handle device_model_handle) |
Get device model description. | |
const char * | iotcs_get_device_model_urn (iotcs_device_model_handle device_model_handle) |
Get device model urn. | |
void | iotcs_free_device_model (iotcs_device_model_handle device_model_handle) |
Release Device Handle. | |
iotcs_result | iotcs_create_virtual_device_handle (const char *endpoint_id, iotcs_device_model_handle device_model_handle, iotcs_virtual_device_handle *virtual_device_handle) |
Get Device Handle. | |
void | iotcs_free_virtual_device_handle (iotcs_virtual_device_handle virtual_device_handle) |
Release Device Handle. | |
iotcs_result | iotcs_virtual_device_set (iotcs_virtual_device_handle virtual_device_handle, const char *attribute_name, const void *value, size_t length) |
Set value of Device Attribute. | |
iotcs_result | iotcs_virtual_device_offer_boolean (iotcs_virtual_device_handle virtual_device_handle, const char *attribute_name, iotcs_bool value) |
Offer to set the value of an attribute. | |
iotcs_result | iotcs_virtual_device_offer_integer (iotcs_virtual_device_handle virtual_device_handle, const char *attribute_name, int value) |
Offer to set the value of an attribute. | |
iotcs_result | iotcs_virtual_device_offer_float (iotcs_virtual_device_handle virtual_device_handle, const char *attribute_name, float value) |
Offer to set the value of an attribute. | |
iotcs_result | iotcs_virtual_device_offer_date_time (iotcs_virtual_device_handle virtual_device_handle, const char *attribute_name, iotcs_date_time value) |
Offer to set the value of an attribute. | |
iotcs_result | iotcs_virtual_device_get_string (iotcs_virtual_device_handle virtual_device_handle, const char *attribute_name, const char **value) |
Get STRING value of Device Attribute. | |
iotcs_result | iotcs_virtual_device_set_string (iotcs_virtual_device_handle virtual_device_handle, const char *attribute_name, const char *value) |
Set STRING value of Device Attribute. | |
iotcs_result | iotcs_virtual_device_get_integer (iotcs_virtual_device_handle virtual_device_handle, const char *attribute_name, int *value) |
Get INTEGER value of Device Attribute. | |
iotcs_result | iotcs_virtual_device_set_integer (iotcs_virtual_device_handle virtual_device_handle, const char *attribute_name, int value) |
Set INTEGER value of Device Attribute. | |
iotcs_result | iotcs_virtual_device_get_float (iotcs_virtual_device_handle virtual_device_handle, const char *attribute_name, float *value) |
Get NUMBER value of Device Attribute. | |
iotcs_result | iotcs_virtual_device_set_float (iotcs_virtual_device_handle virtual_device_handle, const char *attribute_name, float value) |
Set NUMBER value of Device Attribute. | |
iotcs_result | iotcs_virtual_device_get_boolean (iotcs_virtual_device_handle virtual_device_handle, const char *attribute_name, iotcs_bool *value) |
Get BOOLEAN value of Device Attribute. | |
iotcs_result | iotcs_virtual_device_set_boolean (iotcs_virtual_device_handle virtual_device_handle, const char *attribute_name, iotcs_bool value) |
Set BOOLEAN value of Device Attribute. | |
iotcs_result | iotcs_virtual_device_get_date_time (iotcs_virtual_device_handle virtual_device_handle, const char *attribute_name, iotcs_date_time *value) |
Get DATETIME value of Device Attribute. | |
iotcs_result | iotcs_virtual_device_set_date_time (iotcs_virtual_device_handle virtual_device_handle, const char *attribute_name, iotcs_date_time value) |
Set DATETIME value of Device Attribute. | |
void | iotcs_virtual_device_set_on_change (iotcs_virtual_device_handle virtual_device_handle, iotcs_virtual_device_changed_callback callback) |
Set callback for every external change of Device Attributes. | |
iotcs_result | iotcs_virtual_device_attribute_set_on_change (iotcs_virtual_device_handle virtual_device_handle, const char *attribute_name, iotcs_virtual_device_changed_callback callback) |
Set callback for every external change of particular Device Attribute. | |
void | iotcs_virtual_device_set_on_error (iotcs_virtual_device_handle virtual_device_handle, iotcs_virtual_device_error_callback callback) |
Set callback for network failure of Device Attribute change notification. | |
iotcs_result | iotcs_virtual_device_attribute_set_on_error (iotcs_virtual_device_handle virtual_device_handle, const char *attribute_name, iotcs_virtual_device_error_callback callback) |
Set callback for network failure of particular Device Attribute change notification. | |
iotcs_result | iotcs_virtual_device_set_callback (iotcs_virtual_device_handle virtual_device_handle, const char *action_name, iotcs_action_callback callback) |
Set callback for given action. | |
iotcs_result | iotcs_virtual_device_set_on_action_callback (iotcs_virtual_device_handle virtual_device_handle, const char *action_name, iotcs_virtual_device_on_action_callback callback) |
Set callback for given action. | |
iotcs_result | iotcs_virtual_device_set_global_on_action_callback (iotcs_virtual_device_handle virtual_device_handle, iotcs_virtual_device_on_action_callback callback) |
Set callback for all actions. | |
void | iotcs_virtual_device_start_update (iotcs_virtual_device_handle virtual_device_handle) |
Suspend background network notifications of changed attribute values. | |
void | iotcs_virtual_device_finish_update (iotcs_virtual_device_handle virtual_device_handle) |
Resume background network notifications of changed attribute values. | |
iotcs_result | iotcs_virtual_device_create_alert_handle (iotcs_virtual_device_handle virtual_device_handle, const char *alert_name, iotcs_alert_handle *alert_handle) |
Get Device Alert Handle. | |
void | iotcs_virtual_device_free_alert_handle (iotcs_alert_handle alert_handle) |
Release Device Alert Handle. | |
iotcs_result | iotcs_alert_raise (iotcs_alert_handle alert_handle) |
Send Alert asynchronously. |
The file defines the iot cs device model APIs.
typedef void(* iotcs_action_callback)(iotcs_virtual_device_handle virtual_device_handle, iotcs_typed_value argument) |
Callback invoked in case of action request.
virtual_device_handle | The device for which this action has been invoked |
name | name of action |
argument | argument value together with its type |
typedef void(* iotcs_virtual_device_changed_callback)(iotcs_virtual_device_change_event *event) |
Callback invoked in case of attribute value change.
event | describes attribute together with old and new values |
typedef void(* iotcs_virtual_device_error_callback)(iotcs_virtual_device_error_event *event) |
Callback invoked in case of network error in attribute update process.
event | describes attribute together with old and new values |
typedef void(* iotcs_virtual_device_on_action_callback)(iotcs_virtual_device_handle device_handle, char *action, iotcs_named_value *argument) |
Callback invoked in case of action request.
argument | contains arguments and virtual device |
iotcs_result iotcs_alert_raise | ( | iotcs_alert_handle | alert_handle | ) |
Send Alert asynchronously.
alert_handle | Alert handle |
IOTCS_RESULT_INVALID_ARGUMENT | if alert_handle is NULL. |
IOTCS_RESULT_OUT_OF_MEMORY | if no additional memory can be allocated for use.. |
IOTCS_RESULT_OK | if succeeds. Operation could be retried at a later time. |
IOTCS_RESULT_FAIL | no new values or not all non-optional values were set since the last iotcs_alert_raise invocation. |
iotcs_result iotcs_create_virtual_device_handle | ( | const char * | endpoint_id, |
iotcs_device_model_handle | device_model_handle, | ||
iotcs_virtual_device_handle * | virtual_device_handle | ||
) |
Get Device Handle.
endpoint_id | endpoint id |
device_model_handle | Device model handle |
virtual_device_handle | address of Device handle |
IOTCS_RESULT_INVALID_ARGUMENT | if endpoint_id or device_model_handle are NULL. |
IOTCS_RESULT_OUT_OF_MEMORY | if no additional memory can be allocated for use. |
IOTCS_RESULT_OK | if succeeds. |
IOTCS_RESULT_FAIL | otherwise. |
void iotcs_free_device_model | ( | iotcs_device_model_handle | device_model_handle | ) |
Release Device Handle.
device_model_handle | Device Handle to release |
void iotcs_free_virtual_device_handle | ( | iotcs_virtual_device_handle | virtual_device_handle | ) |
Release Device Handle.
virtual_device_handle | Device Handle to release |
iotcs_result iotcs_get_device_model | ( | const char * | device_model, |
iotcs_device_model_handle * | device_model_handle | ||
) |
Get device model handle for a given name.
device_model | device model URN |
device_model_handle | address of Device Model Handle |
IOTCS_RESULT_INVALID_ARGUMENT | if device model urn is NULL. |
IOTCS_RESULT_FAIL | if there are no device models with current urn on the server or returned device model is incorrect. |
IOTCS_RESULT_OK | if succeeds. |
const char* iotcs_get_device_model_description | ( | iotcs_device_model_handle | device_model_handle | ) |
Get device model description.
device_model_handle | address of Device Model Handle |
device | model description |
const char* iotcs_get_device_model_name | ( | iotcs_device_model_handle | device_model_handle | ) |
Get device model name.
device_model_handle | address of Device Model Handle |
device | model name |
const char* iotcs_get_device_model_urn | ( | iotcs_device_model_handle | device_model_handle | ) |
Get device model urn.
device_model_handle | address of Device Model Handle |
device | model urn |
iotcs_result iotcs_virtual_device_attribute_set_on_change | ( | iotcs_virtual_device_handle | virtual_device_handle, |
const char * | attribute_name, | ||
iotcs_virtual_device_changed_callback | callback | ||
) |
Set callback for every external change of particular Device Attribute.
virtual_device_handle | Device Handle |
attribute_name | Name of the attribute |
callback | callback to call |
IOTCS_RESULT_INVALID_ARGUMENT | if virtual_device_handle or attribute_name are NULL. |
IOTCS_RESULT_INVALID_ARGUMENT | if given attribute_name wasn't found. |
IOTCS_RESULT_OK | if succeeds. |
iotcs_result iotcs_virtual_device_attribute_set_on_error | ( | iotcs_virtual_device_handle | virtual_device_handle, |
const char * | attribute_name, | ||
iotcs_virtual_device_error_callback | callback | ||
) |
Set callback for network failure of particular Device Attribute change notification.
virtual_device_handle | Device Handle |
attribute_name | Name of the attribute |
callback | callback to call |
IOTCS_RESULT_INVALID_ARGUMENT | if virtual_device_handle or attribute_name are NULL. |
IOTCS_RESULT_INVALID_ARGUMENT | if given attribute_name wasn't found. |
IOTCS_RESULT_OK | if succeeds. |
iotcs_result iotcs_virtual_device_create_alert_handle | ( | iotcs_virtual_device_handle | virtual_device_handle, |
const char * | alert_name, | ||
iotcs_alert_handle * | alert_handle | ||
) |
Get Device Alert Handle.
virtual_device_handle | Device Handle |
alert_name | Name of the alert |
alert_handle | address of Device Alert Handle |
IOTCS_RESULT_INVALID_ARGUMENT | if virtual_device_handle or alert_name are NULL. |
IOTCS_RESULT_OUT_OF_MEMORY | if no additional memory can be allocated for use. |
IOTCS_RESULT_OK | if succeeds. |
IOTCS_RESULT_FAIL | otherwise. |
void iotcs_virtual_device_finish_update | ( | iotcs_virtual_device_handle | virtual_device_handle | ) |
Resume background network notifications of changed attribute values.
virtual_device_handle | Device Handle |
void iotcs_virtual_device_free_alert_handle | ( | iotcs_alert_handle | alert_handle | ) |
Release Device Alert Handle.
alert_handle | Device Alert Handle to release |
iotcs_result iotcs_virtual_device_get_boolean | ( | iotcs_virtual_device_handle | virtual_device_handle, |
const char * | attribute_name, | ||
iotcs_bool * | value | ||
) |
Get BOOLEAN value of Device Attribute.
virtual_device_handle | Device Handle |
attribute_name | Name of the attribute |
value | address of value to return |
IOTCS_RESULT_INVALID_ARGUMENT | if virtual_device_handle or attribute_name are NULL. |
IOTCS_RESULT_INVALID_ARGUMENT | if given attribute_name wasn't found. |
IOTCS_RESULT_FAIL | if an attribute value wasn't set before and there is no default value. |
IOTCS_RESULT_OK | if succeeds. |
iotcs_result iotcs_virtual_device_get_date_time | ( | iotcs_virtual_device_handle | virtual_device_handle, |
const char * | attribute_name, | ||
iotcs_date_time * | value | ||
) |
Get DATETIME value of Device Attribute.
virtual_device_handle | Device Handle |
attribute_name | Name of the attribute |
value | address of value to return |
IOTCS_RESULT_INVALID_ARGUMENT | if virtual_device_handle or attribute_name are NULL. |
IOTCS_RESULT_INVALID_ARGUMENT | if given attribute_name wasn't found. |
IOTCS_RESULT_FAIL | if an attribute value wasn't set before and there is no default value. |
IOTCS_RESULT_OK | if succeeds. |
iotcs_result iotcs_virtual_device_get_float | ( | iotcs_virtual_device_handle | virtual_device_handle, |
const char * | attribute_name, | ||
float * | value | ||
) |
Get NUMBER value of Device Attribute.
virtual_device_handle | Device Handle |
attribute_name | Name of the attribute |
value | address of value to return |
IOTCS_RESULT_INVALID_ARGUMENT | if virtual_device_handle or attribute_name are NULL. |
IOTCS_RESULT_INVALID_ARGUMENT | if given attribute_name wasn't found. |
IOTCS_RESULT_FAIL | if an attribute value wasn't set before and there is no default value. |
IOTCS_RESULT_OK | if succeeds. |
iotcs_result iotcs_virtual_device_get_integer | ( | iotcs_virtual_device_handle | virtual_device_handle, |
const char * | attribute_name, | ||
int * | value | ||
) |
Get INTEGER value of Device Attribute.
virtual_device_handle | Device Handle |
attribute_name | Name of the attribute |
value | address of value to return |
IOTCS_RESULT_INVALID_ARGUMENT | if virtual_device_handle or attribute_name are NULL. |
IOTCS_RESULT_INVALID_ARGUMENT | if given attribute_name wasn't found. |
IOTCS_RESULT_FAIL | if an attribute value wasn't set before and there is no default value. |
IOTCS_RESULT_OK | if succeeds. |
iotcs_result iotcs_virtual_device_get_string | ( | iotcs_virtual_device_handle | virtual_device_handle, |
const char * | attribute_name, | ||
const char ** | value | ||
) |
Get STRING value of Device Attribute.
virtual_device_handle | Device Handle |
attribute_name | Name of the attribute |
value | address of pointer to null-terminated string. The string will be allocated by the library and use must release it by calling free(ptr) |
IOTCS_RESULT_INVALID_ARGUMENT | if virtual_device_handle or attribute_name are NULL. |
IOTCS_RESULT_INVALID_ARGUMENT | if given attribute_name wasn't found. |
IOTCS_RESULT_FAIL | if an attribute value wasn't set before and there is no default value. |
IOTCS_RESULT_OK | if succeeds. |
iotcs_result iotcs_virtual_device_offer_boolean | ( | iotcs_virtual_device_handle | virtual_device_handle, |
const char * | attribute_name, | ||
iotcs_bool | value | ||
) |
Offer to set the value of an attribute.
The attribute value is set depending upon any policy that may have been configured for the attribute. If there is no policy for the given attribute, offer behaves as if the iotcs_virtual_device_set method were called. The value is validated according to the constraints in the device model.
virtual_device_handle | Device Handle |
attribute_name | the name of an attribute from the device type model |
value | the value to set |
IOTCS_RESULT_INVALID_ARGUMENT | If the value is not valid |
IOTCS_RESULT_OK | if succeeds. |
iotcs_result iotcs_virtual_device_offer_date_time | ( | iotcs_virtual_device_handle | virtual_device_handle, |
const char * | attribute_name, | ||
iotcs_date_time | value | ||
) |
Offer to set the value of an attribute.
The attribute value is set depending upon any policy that may have been configured for the attribute. If there is no policy for the given attribute, offer behaves as if the iotcs_virtual_device_set method were called. The value is validated according to the constraints in the device model.
virtual_device_handle | Device Handle |
attribute_name | the name of an attribute from the device type model |
value | the value to set |
IOTCS_RESULT_INVALID_ARGUMENT | If the value is not valid |
IOTCS_RESULT_OK | if succeeds. |
iotcs_result iotcs_virtual_device_offer_float | ( | iotcs_virtual_device_handle | virtual_device_handle, |
const char * | attribute_name, | ||
float | value | ||
) |
Offer to set the value of an attribute.
The attribute value is set depending upon any policy that may have been configured for the attribute. If there is no policy for the given attribute, offer behaves as if the iotcs_virtual_device_set method were called. The value is validated according to the constraints in the device model.
virtual_device_handle | Device Handle |
attribute_name | the name of an attribute from the device type model |
value | the value to set |
IOTCS_RESULT_INVALID_ARGUMENT | If the value is not valid |
IOTCS_RESULT_OK | if succeeds. |
iotcs_result iotcs_virtual_device_offer_integer | ( | iotcs_virtual_device_handle | virtual_device_handle, |
const char * | attribute_name, | ||
int | value | ||
) |
Offer to set the value of an attribute.
The attribute value is set depending upon any policy that may have been configured for the attribute. If there is no policy for the given attribute, offer behaves as if the iotcs_virtual_device_set method were called. The value is validated according to the constraints in the device model.
virtual_device_handle | Device Handle |
attribute_name | the name of an attribute from the device type model |
value | the value to set |
IOTCS_RESULT_INVALID_ARGUMENT | If the value is not valid |
IOTCS_RESULT_OK | if succeeds. |
iotcs_result iotcs_virtual_device_set | ( | iotcs_virtual_device_handle | virtual_device_handle, |
const char * | attribute_name, | ||
const void * | value, | ||
size_t | length | ||
) |
Set value of Device Attribute.
virtual_device_handle | Device Handle |
attribute_name | Name of the attribute |
value | pointer array of values of 'length' bytes. The particular type is determined based on attribute type and could be: const char*, int, float, iotcs_bool or iotcs_date_time. |
length | length of 'value' array in bytes |
IOTCS_RESULT_INVALID_ARGUMENT | if virtual_device_handle or attribute_name are NULL. |
IOTCS_RESULT_INVALID_ARGUMENT | if given attribute_name wasn't found. |
IOTCS_RESULT_OK | if succeeds. |
iotcs_result iotcs_virtual_device_set_boolean | ( | iotcs_virtual_device_handle | virtual_device_handle, |
const char * | attribute_name, | ||
iotcs_bool | value | ||
) |
Set BOOLEAN value of Device Attribute.
virtual_device_handle | Device Handle |
attribute_name | Name of the attribute |
value | value to set |
IOTCS_RESULT_INVALID_ARGUMENT | if virtual_device_handle or attribute_name are NULL. |
IOTCS_RESULT_INVALID_ARGUMENT | if given attribute_name wasn't found or attribute type is different. Operation could be retried at a later time. |
IOTCS_RESULT_OK | if succeeds. |
iotcs_result iotcs_virtual_device_set_callback | ( | iotcs_virtual_device_handle | virtual_device_handle, |
const char * | action_name, | ||
iotcs_action_callback | callback | ||
) |
Set callback for given action.
virtual_device_handle | Device Handle |
action_name | Name of the action |
callback | callback to call |
IOTCS_RESULT_INVALID_ARGUMENT | if virtual_device_handle or action_name are NULL. |
IOTCS_RESULT_INVALID_ARGUMENT | given action_name wasn't found. |
IOTCS_RESULT_OK | if succeeds. |
iotcs_result iotcs_virtual_device_set_date_time | ( | iotcs_virtual_device_handle | virtual_device_handle, |
const char * | attribute_name, | ||
iotcs_date_time | value | ||
) |
Set DATETIME value of Device Attribute.
virtual_device_handle | Device Handle |
attribute_name | Name of the attribute |
value | value to set |
IOTCS_RESULT_INVALID_ARGUMENT | if virtual_device_handle or attribute_name are NULL. |
IOTCS_RESULT_INVALID_ARGUMENT | if given attribute_name wasn't found or attribute type is different. Operation could be retried at a later time. |
IOTCS_RESULT_OK | if succeeds. |
iotcs_result iotcs_virtual_device_set_float | ( | iotcs_virtual_device_handle | virtual_device_handle, |
const char * | attribute_name, | ||
float | value | ||
) |
Set NUMBER value of Device Attribute.
virtual_device_handle | Device Handle |
attribute_name | Name of the attribute |
value | value to set |
IOTCS_RESULT_INVALID_ARGUMENT | if virtual_device_handle or attribute_name are NULL. |
IOTCS_RESULT_INVALID_ARGUMENT | if given attribute_name wasn't found or attribute type is different. Operation could be retried at a later time. |
IOTCS_RESULT_OK | if succeeds. |
iotcs_result iotcs_virtual_device_set_global_on_action_callback | ( | iotcs_virtual_device_handle | virtual_device_handle, |
iotcs_virtual_device_on_action_callback | callback | ||
) |
Set callback for all actions.
virtual_device_handle | Device Handle |
action_name | Name of the action |
callback | callback to call |
IOTCS_RESULT_INVALID_ARGUMENT | if virtual_device_handle or action_name are NULL. |
IOTCS_RESULT_INVALID_ARGUMENT | given action_name wasn't found. |
IOTCS_RESULT_OK | if succeeds. |
iotcs_result iotcs_virtual_device_set_integer | ( | iotcs_virtual_device_handle | virtual_device_handle, |
const char * | attribute_name, | ||
int | value | ||
) |
Set INTEGER value of Device Attribute.
virtual_device_handle | Device Handle |
attribute_name | Name of the attribute |
value | value to set |
IOTCS_RESULT_INVALID_ARGUMENT | if virtual_device_handle or attribute_name are NULL. |
IOTCS_RESULT_INVALID_ARGUMENT | if given attribute_name wasn't found or attribute type is different. Operation could be retried at a later time. |
IOTCS_RESULT_OK | if succeeds. |
iotcs_result iotcs_virtual_device_set_on_action_callback | ( | iotcs_virtual_device_handle | virtual_device_handle, |
const char * | action_name, | ||
iotcs_virtual_device_on_action_callback | callback | ||
) |
Set callback for given action.
virtual_device_handle | Device Handle |
action_name | Name of the action |
callback | callback to call |
IOTCS_RESULT_INVALID_ARGUMENT | if virtual_device_handle or action_name are NULL. |
IOTCS_RESULT_INVALID_ARGUMENT | given action_name wasn't found. |
IOTCS_RESULT_OK | if succeeds. |
void iotcs_virtual_device_set_on_change | ( | iotcs_virtual_device_handle | virtual_device_handle, |
iotcs_virtual_device_changed_callback | callback | ||
) |
Set callback for every external change of Device Attributes.
virtual_device_handle | Device Handle |
callback | callback to call |
void iotcs_virtual_device_set_on_error | ( | iotcs_virtual_device_handle | virtual_device_handle, |
iotcs_virtual_device_error_callback | callback | ||
) |
Set callback for network failure of Device Attribute change notification.
virtual_device_handle | Device Handle |
callback | callback to call |
iotcs_result iotcs_virtual_device_set_string | ( | iotcs_virtual_device_handle | virtual_device_handle, |
const char * | attribute_name, | ||
const char * | value | ||
) |
Set STRING value of Device Attribute.
virtual_device_handle | Device Handle |
attribute_name | Name of the attribute |
value | pointer to null-terminated string |
IOTCS_RESULT_INVALID_ARGUMENT | if virtual_device_handle or attribute_name are NULL. |
IOTCS_RESULT_INVALID_ARGUMENT | if given attribute_name wasn't found or attribute type is different. Operation could be retried at a later time. |
IOTCS_RESULT_OK | if succeeds. |
void iotcs_virtual_device_start_update | ( | iotcs_virtual_device_handle | virtual_device_handle | ) |
Suspend background network notifications of changed attribute values.
virtual_device_handle | Device Handle |