![]() |
NTURT Zephyr v0.0.1
NTURT common library for Zephyr RTOS
|
Telemetry support. More...
Topics | |
VCU Telemetry | |
VCU telemetry support. | |
Data Structures | |
struct | tm_group_data |
Telemetry group data. More... | |
struct | tm_data |
Telemetry data. More... | |
struct | tm_group |
Telemetry publishing group. More... | |
Macros | |
#define | TM_DATA_DECLARE(name, type) |
Declare a telemetry data, useful for header files. | |
#define | TM_DATA_DEFINE(_name, _type, _addr) |
Define a telemetry data. | |
#define | TM_ALIAS_DECLARE(name, alias) |
Declare a telemetry data alias, useful for header files. | |
#define | TM_ALIAS_DEFINE(_name, _alias, _addr) |
Define a telemetry data alias. | |
#define | TM_GROUP_DATA(data, ...) |
Specify a telemetry data to be aggregated and published by a telemetry group. Used in TM_GROUP_DEFINE. | |
#define | TM_GROUP_DEFINE(_name, _period, _min_separation, _watermark, _flag, _publish, _user_data, ...) |
Define a telemetry group to aggregrate and publish telementry data. | |
#define | TM_DATA_GET(name) |
Get the value of telemetry data using its name. | |
#define | TM_DATA_UPDATE(name, value) |
Update telemetry data using its name and value. | |
Typedefs | |
typedef void(* | tm_publish_t) (uint32_t addr, const void *data, size_t size, void *user_data) |
Function to publish the data. | |
Enumerations | |
enum | tm_data_type { TM_DATA_TYPE_NORMAL = 0 , TM_DATA_TYPE_ALIAS } |
Telemetry data type. More... | |
Functions | |
int | tm_data_get (uint32_t addr, void *value) |
Get telemetry data using its address and pointer to value. | |
int | tm_data_update (uint32_t addr, const void *value) |
Update telemetry data using its address and pointer to value. | |
void | tm_data_notify_lock (const struct tm_data *data) |
Notify the telemetry groups that this data has been updated. Must be called while holding the lock. | |
void | tm_group_copy (struct tm_group *group) |
Copy the data in the telemetry data to the group's publishing buffer. | |
Telemetry support.
#define TM_ALIAS_DECLARE | ( | name, | |
alias ) |
#include <nturt/telemetry.h>
Declare a telemetry data alias, useful for header files.
[in] | name | Name of the alias. |
[in] | alias | Telemetry data that this alias refers to. |
#define TM_ALIAS_DEFINE | ( | _name, | |
_alias, | |||
_addr ) |
#include <nturt/telemetry.h>
Define a telemetry data alias.
[in] | _name | Name of the alias. |
[in] | _alias | Telemetry data that this alias refers to. |
[in] | _addr | Address of the alias. |
#define TM_DATA_DECLARE | ( | name, | |
type ) |
#include <nturt/telemetry.h>
Declare a telemetry data, useful for header files.
[in] | name | Name of the data. |
[in] | type | Type of the data. |
#define TM_DATA_DEFINE | ( | _name, | |
_type, | |||
_addr ) |
#include <nturt/telemetry.h>
Define a telemetry data.
[in] | _name | Name of the data. |
[in] | _type | Type of the data. |
[in] | _addr | Address of the data. |
#define TM_DATA_GET | ( | name | ) |
#include <nturt/telemetry.h>
Get the value of telemetry data using its name.
[in] | name | Name of the telemetry data. |
#define TM_DATA_UPDATE | ( | name, | |
value ) |
#include <nturt/telemetry.h>
Update telemetry data using its name and value.
[in] | name | Name of the telemetry data. |
[in] | value | New value of the telemetry data. |
#define TM_GROUP_DATA | ( | data, | |
... ) |
#include <nturt/telemetry.h>
Specify a telemetry data to be aggregated and published by a telemetry group. Used in TM_GROUP_DEFINE.
[in] | data | Telemetry data to be aggregated and published. |
[in] | ... | Optional flags of the data, the same ones and rules as AGG_MEMBER. |
#define TM_GROUP_DEFINE | ( | _name, | |
_period, | |||
_min_separation, | |||
_watermark, | |||
_flag, | |||
_publish, | |||
_user_data, | |||
... ) |
#include <nturt/telemetry.h>
Define a telemetry group to aggregrate and publish telementry data.
[in] | _name | Name of the telemetry group. |
[in] | _period | Period of data publishing. |
[in] | _min_separation | Minimum separation time between two data publishing. |
[in] | _watermark | Watermark to wait for late-arriving members. |
[in] | _flag | Flag of the aggregation. The same ones and rules as flag in AGG_DEFINE. |
[in] | _publish | Function to publish the data, must be of type tm_publish_t. |
[in] | _user_data | Pointer to custom data for the callback. |
[in] | ... | Data to be aggregated and published, must be specified by TM_GROUP_DATA. |
typedef void(* tm_publish_t) (uint32_t addr, const void *data, size_t size, void *user_data) |
#include <nturt/telemetry.h>
Function to publish the data.
[in] | addr | Address of the data. |
[in] | data | Pointer to the data to be published. |
[in] | size | Size of the data to be published. |
[in] | user_data | Pointer to custom data for callback functions. |
enum tm_data_type |
int tm_data_get | ( | uint32_t | addr, |
void * | value ) |
#include <nturt/telemetry.h>
Get telemetry data using its address and pointer to value.
[in] | addr | Address of the telemetry data. |
[out] | value | Pointer to store the retrieved value. |
0 | For success. |
-ENOENT | If the data does not exist. |
void tm_data_notify_lock | ( | const struct tm_data * | data | ) |
#include <nturt/telemetry.h>
Notify the telemetry groups that this data has been updated. Must be called while holding the lock.
[in] | data | Pointer to tm_data. |
int tm_data_update | ( | uint32_t | addr, |
const void * | value ) |
#include <nturt/telemetry.h>
Update telemetry data using its address and pointer to value.
[in] | addr | Address of the telemetry data. |
[in] | value | Pointer to the new value of the telemetry data. |
0 | For success. |
-ENOENT | If the data does not exist. |
void tm_group_copy | ( | struct tm_group * | group | ) |
#include <nturt/telemetry.h>
Copy the data in the telemetry data to the group's publishing buffer.
[in] | group | Pointer to tm_group. |