IoTivity-Lite
|
Macros | |
#define | oc_activate_interrupt_handler(name) (oc_process_start(&(name##_interrupt_x), 0)) |
activate the interrupt handler More... | |
#define | oc_define_interrupt_handler(name) |
define the interrupt handler More... | |
#define | oc_signal_interrupt_handler(name) |
API for setting handlers for interrupts. More... | |
Functions | |
bool | oc_has_delayed_callback (const void *cb_data, oc_trigger_t callback, bool ignore_cb_data) |
Check if given delayed callback has already been scheduled. More... | |
void | oc_remove_delayed_callback (const void *cb_data, oc_trigger_t callback) |
Cancel a scheduled delayed callback. More... | |
void | oc_remove_delayed_callback_by_filter (oc_trigger_t cb, oc_ri_timed_event_filter_t filter, const void *filter_data, bool match_all, oc_ri_timed_event_on_delete_t on_delete) |
Cancel a scheduled delayed callback by matching it by the provided filtering function. More... | |
void | oc_set_delayed_callback (void *cb_data, oc_trigger_t callback, uint16_t seconds) |
Schedule a callback to be invoked after a set number of seconds. More... | |
void | oc_set_delayed_callback_ms (void *cb_data, oc_trigger_t callback, uint16_t milliseconds) |
Schedule a callback to be invoked after a set number of milliseconds. More... | |
void | oc_set_delayed_callback_ms_v1 (void *cb_data, oc_trigger_t callback, uint64_t milliseconds) |
Schedule a callback to be invoked after a set number of milliseconds. More... | |
void | oc_set_immutable_device_identifier (size_t device, const oc_uuid_t *piid) |
Set the immutable device identifier. More... | |
#define oc_activate_interrupt_handler | ( | name | ) | (oc_process_start(&(name##_interrupt_x), 0)) |
activate the interrupt handler
#define oc_define_interrupt_handler | ( | name | ) |
define the interrupt handler
#define oc_signal_interrupt_handler | ( | name | ) |
API for setting handlers for interrupts.
bool oc_has_delayed_callback | ( | const void * | cb_data, |
oc_trigger_t | callback, | ||
bool | ignore_cb_data | ||
) |
Check if given delayed callback has already been scheduled.
To match a delayed callback: 1) function pointers must be equal 2) the user defined context pointers must be equal or ignore_cb_data must be true
cb_data | the user defined context pointer |
callback | the delayed callback to look for |
ignore_cb_data | don't compare the user defined context pointers |
void oc_remove_delayed_callback | ( | const void * | cb_data, |
oc_trigger_t | callback | ||
) |
Cancel a scheduled delayed callback.
[in] | cb_data | the user defined context pointer that was passed to the oc_set_delayed_callback() function |
[in] | callback | the delayed callback that is being removed |
void oc_remove_delayed_callback_by_filter | ( | oc_trigger_t | cb, |
oc_ri_timed_event_filter_t | filter, | ||
const void * | filter_data, | ||
bool | match_all, | ||
oc_ri_timed_event_on_delete_t | on_delete | ||
) |
Cancel a scheduled delayed callback by matching it by the provided filtering function.
[in] | cb | the delayed callback that is being removed |
[in] | filter | filtering function (cannot be NULL) |
[in] | filter_data | user data provided to the filtering function |
[in] | match_all | iterate over all delayed callbacks (otherwise the iteration will stop after the first match) |
[in] | on_delete | function invoked with the context data of the delayed callback, before the callback is deallocated |
on_delete
callback will be invoked when the processing is finished. So it might occurr some time after the call to oc_ri_remove_timed_event_callback_by_filter has finished.void oc_set_delayed_callback | ( | void * | cb_data, |
oc_trigger_t | callback, | ||
uint16_t | seconds | ||
) |
Schedule a callback to be invoked after a set number of seconds.
[in] | cb_data | user defined context pointer that is passed to the oc_trigger_t callback |
[in] | callback | the callback invoked after the set number of seconds |
[in] | seconds | the number of seconds to wait till the callback is invoked |
void oc_set_delayed_callback_ms | ( | void * | cb_data, |
oc_trigger_t | callback, | ||
uint16_t | milliseconds | ||
) |
Schedule a callback to be invoked after a set number of milliseconds.
[in] | cb_data | user defined context pointer that is passed to the oc_trigger_t callback |
[in] | callback | the callback invoked after the set number of milliseconds |
[in] | milliseconds | the number of milliseconds to wait till the callback is invoked |
void oc_set_delayed_callback_ms_v1 | ( | void * | cb_data, |
oc_trigger_t | callback, | ||
uint64_t | milliseconds | ||
) |
Schedule a callback to be invoked after a set number of milliseconds.
[in] | cb_data | user defined context pointer that is passed to the oc_trigger_t callback |
[in] | callback | the callback invoked after the set number of milliseconds |
[in] | milliseconds | the number of milliseconds to wait till the callback is invoked |
void oc_set_immutable_device_identifier | ( | size_t | device, |
const oc_uuid_t * | piid | ||
) |
Set the immutable device identifier.
This will set the piid
device property (a.k.a Protocol Independent ID)
Unlike device id di
device property the piid
will remain the same even after device resets.
[in] | device | the logical device index |
[in] | piid | the UUID for the immutable device identifier |