|
Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
|
Algorithm runner API. More...
Functions | |
| void | algorithm_runner_init (void) |
| Initialise the algorithm runner. | |
| int | algorithm_runner_register (const struct infuse_algorithm *algorithm) |
| Register an algorithm with the runner. | |
| int | algorithm_runner_unregister (const struct infuse_algorithm *algorithm) |
| Unregister an algorithm from the runner. | |
| void | algorithm_runner_tdf_log (const struct kv_algorithm_logging *logging, uint8_t tdf_mask, uint16_t tdf_id, uint8_t tdf_len, uint64_t time, const void *data) |
| Log a single TDF as requested by algorithm configuration. | |
Algorithm runner API.
| void algorithm_runner_init | ( | void | ) |
#include </__w/infuse-sdk/infuse-sdk/infuse-sdk/include/infuse/algorithm_runner/runner.h>
Initialise the algorithm runner.
| int algorithm_runner_register | ( | const struct infuse_algorithm * | algorithm | ) |
#include </__w/infuse-sdk/infuse-sdk/infuse-sdk/include/infuse/algorithm_runner/runner.h>
Register an algorithm with the runner.
| algorithm | Algorithm to register |
| 0 | Algorithm registered |
| -EINVAL | Invalid algorithm configuration |
| -EALREADY | Algorithm is already registered |
| -ENOMEM | No free algorithm registration slots |
| void algorithm_runner_tdf_log | ( | const struct kv_algorithm_logging * | logging, |
| uint8_t | tdf_mask, | ||
| uint16_t | tdf_id, | ||
| uint8_t | tdf_len, | ||
| uint64_t | time, | ||
| const void * | data ) |
#include </__w/infuse-sdk/infuse-sdk/infuse-sdk/include/infuse/algorithm_runner/runner.h>
Log a single TDF as requested by algorithm configuration.
| logging | Algorithm logging configuration |
| tdf_mask | Single TDF mask that corresponds to tdf_id |
| tdf_id | TDF sensor ID |
| tdf_len | Length of a single TDF |
| time | Epoch time associated with the TDF. 0 for no timestamp. |
| data | TDF data array |
| int algorithm_runner_unregister | ( | const struct infuse_algorithm * | algorithm | ) |
#include </__w/infuse-sdk/infuse-sdk/infuse-sdk/include/infuse/algorithm_runner/runner.h>
Unregister an algorithm from the runner.
| algorithm | Algorithm to unregister |
| 0 | Algorithm was found and unregistered |
| -EINVAL | Invalid algorithm configuration |
| -ENOENT | Algorithm was not registered with the runner |