|
Modbus Vault v1.0
|
Provide telemetry services. More...
Go to the source code of this file.
Macros | |
| #define | TELEMETRY_SERVICE_TASK_NAME ("TELE_SRVC") |
| #define | TELEMETRY_SERVICE_TASK_STACK_DEPTH (4096U) |
| #define | TELEMETRY_SERVICE_TASK_PRIORITY (4U) |
| #define | TELEMETRY_SERVICE_TASK_CPU_AFFINITY (1U) |
| #define | TELEMETRY_SERVICE_TASK_NOTIFY_STOP_BIT (1U << 0) |
| #define | TELEMETRY_SERVICE_TASK_NOTIFY_LIVE_BIT (1U << 1) |
| #define | TELEMETRY_SERVICE_TASK_NOTIFY_REPLAY_BIT (1U << 2) |
| #define | TELEMETRY_SERVICE_TASK_NOTIFY_ONLINE_BIT (1U << 3) |
Enumerations | |
| enum | telemetry_service_topics_t { TELEMETRY_SERVICE_TOPICS_LIVE = 0U , TELEMETRY_SERVICE_TOPICS_REPLAY = 1U , TELEMETRY_SERVICE_TOPICS_STATUS = 2U , TELEMETRY_SERVICE_TOPICS_MAX } |
| Telemetry service_ topics enum. More... | |
Functions | |
| bool | telemetry_service_init (mqtt_bridge_config_t *mqtt_bridge_config_ptr, bool(*replay_check_cb)(void)) |
| Initialize telemetry service. | |
| bool | telemetry_service_enqueue_live (const telemetry_pipeline_record_t *payload_ptr) |
| Enqueue live record. | |
| bool | telemetry_service_publish_live (const telemetry_pipeline_record_t *payload_ptr) |
| Publish live record. | |
| bool | telemetry_service_publish_replay (const telemetry_pipeline_record_t *payload_ptr) |
| Publish replay record. | |
| bool | telemetry_service_publish_status (const telemetry_pipeline_record_t *payload_ptr) |
| Publish status. | |
| void | telemetry_service_notify_replay_available (void) |
| Send signal replay available. | |
| void | telemetry_service_set_online (bool online) |
| Set online state. | |
| bool | telemetry_service_is_online (void) |
| Get online state. | |
| void | telemetry_service_deinit (void) |
| Deinitialize telemetry service. | |
Provide telemetry services.
| #define TELEMETRY_SERVICE_TASK_CPU_AFFINITY (1U) |
CPU affinity
| #define TELEMETRY_SERVICE_TASK_NAME ("TELE_SRVC") |
Task name
| #define TELEMETRY_SERVICE_TASK_NOTIFY_LIVE_BIT (1U << 1) |
Task notify for live bit
| #define TELEMETRY_SERVICE_TASK_NOTIFY_ONLINE_BIT (1U << 3) |
Task notify for online bit
| #define TELEMETRY_SERVICE_TASK_NOTIFY_REPLAY_BIT (1U << 2) |
Task notify for replay bit
| #define TELEMETRY_SERVICE_TASK_NOTIFY_STOP_BIT (1U << 0) |
Task stop bit
| #define TELEMETRY_SERVICE_TASK_PRIORITY (4U) |
Priority
| #define TELEMETRY_SERVICE_TASK_STACK_DEPTH (4096U) |
Stack depth
Telemetry service_ topics enum.
| bool telemetry_service_enqueue_live | ( | const telemetry_pipeline_record_t * | payload_ptr | ) |
Enqueue live record.
| payload_ptr | Pointer to record |
| bool telemetry_service_init | ( | mqtt_bridge_config_t * | mqtt_bridge_config_ptr, |
| bool(*)(void) | replay_check_cb | ||
| ) |
Initialize telemetry service.
Initialize MQTT bridge instance and create queue
| mqtt_bridge_config_ptr | Pointer to MQTT bridge configuration structure |
| replay_check_cb | Callback for replay check |
< Live queue length
< Publish system's metrics period in micro seconds
| bool telemetry_service_is_online | ( | void | ) |
Get online state.
| bool telemetry_service_publish_live | ( | const telemetry_pipeline_record_t * | payload_ptr | ) |
Publish live record.
| payload_ptr | Pointer to record |
| bool telemetry_service_publish_replay | ( | const telemetry_pipeline_record_t * | payload_ptr | ) |
Publish replay record.
| payload_ptr | Pointer to record |
| bool telemetry_service_publish_status | ( | const telemetry_pipeline_record_t * | payload_ptr | ) |
Publish status.
| payload_ptr | Pointer to record |
| void telemetry_service_set_online | ( | bool | online | ) |
Set online state.
| online | Online state |