C - Extended Worker APIs

This section describes how to use the extended functions available to interact with the IoT Platform.  The definition of each function is described below. By clicking the link provided on the function, you will be redirected to the equivalent function description provided by the IoT Portal interface.  

Function API
Alarm Publish
(TR50: alarm.publish)
Use the following method to publish alarm values to a given thing.

int tr50_alarm_publish_ex(void *tr50, const char * alarm_key, const int state, void* optional_params, void** optional_reply, char** error_msg)

Property Publish
(TR50: property.publish)
Use the following method to publish property values to a given thing.

int tr50_property_publish_ex(void *tr50, const char *prop_key, const double value, void* optional_params, void** optional_reply, char** error_msg)

Property Current
(TR50: property.current)
Use the following method to get property current values for a given thing.

int tr50_property_current_ex(void *tr50, const char *prop_key,double *value, void* optional_params, void** optional_reply, char** error_msg)

Location Publish
(TR50: location.publish)
Use the following method to publish location values to a given thing.

int tr50_location_publish_ex(void *tr50, const char *thing_key, const double lat, const double lng, void* optional_params, void** optional_reply, char** error_msg)

Log Publish
(TR50: log.publish)
Use the following method to publish logs to a given thing.

int tr50_log_publish_ex (void *tr50, const char *msg, void *optional_params, void ** optional_reply, char **error_msg)

Thing Bind
(TR50: thing.bind)
Use the following method to bind the session to a given thing.

int tr50_thing_bind_ex (void *tr50, const char *thing_key, void *optional_params, void ** optional_reply, char **error_msg)

Thing Unbind
(TR50: thing.unbind)
Use the following method to unbind session from a given thing.

int tr50_thing_unbind_ex (void *tr50, const char *thing_key, void *optional_params, void ** optional_reply, char **error_msg)

Attribute Set
(TR50: attr.set)
Use the following method to set an attribute to a given thing.

int tr50_thing_attr_set_ex (void *tr50, const char *key, const char *value, void *optional_params, void ** optional_reply, char **error_msg)

Attribute Unset
(TR50: attr.unset)
Use the following method to unset an attribute for a given thing.

int tr50_thing_attr_unset_ex (void *tr50, const char *key, void *optional_params, void ** optional_reply, char **error_msg)

Attribute Get
(TR50: attr.get)
Use the following method to get the attribute for a given thing.

int tr50_thing_attr_get_ex (void *tr50, const char *key, char **value, void *optional_params, void ** optional_reply, char **error_msg)

Tag Add
(TR50: tag.add)
Use the following method to add a tag for a given thing.

int tr50_thing_tag_add_ex (void *tr50, const char *tags[], const int count, void *optional_params, void ** optional_reply, char **error_msg)

Tag Delete
(TR50: tag.del)
Use the following method to delete a tag for a given thing.

int tr50_thing_tag_delete_ex (void *tr50, const char *tags[], const int count, void *optional_params, void ** optional_reply, char **error_msg)

Mailbox Send
(TR50: mailbox.send)
Use the following method to send a mailbox item to a given thing.

int tr50_mailbox_send_ex (void *tr50, const char *command, JSON* req_params, void *optional_params, void ** reply_params, char **error_msg)

Method Exec
(TR50: method.exec)
Use the following method to invoke a method on a given thing.

int tr50_mailbox_exec_ex (void *tr50, const char *method, JSON* req_params, void *optional_params, void ** reply_params, char **error_msg)