#include "c_list.h"


Go to the source code of this file.
Data Structures | |
struct | tlm_component |
Typedefs | |
typedef void(* | tlm_comp_callback) (tlm_component *comp_ptr, void *arg1, void *arg2) |
Functions | |
tlm_component * | tlm_component_add (const char *name) |
tlm_component * | tlm_component_get_by_name (const char *name) |
void | tlm_component_for_each (tlm_comp_callback callback, void *arg1, void *arg2) |
Detailed Description
This file allows telemetry component registration. Memory locations or variables registered for telemetry are grouped by component. Once registered, the telemetry of these variables can be streamed to a file, network, or just stdio
This file allows to register distinct components by name. Components with duplicate name will fail to be added to the components' list. Once a component is registered, then variables underneath the component can be registered:
- See also
- c_tlm_var.h
Example registration of a component and a couple of variables :
Typedef Documentation
typedef void(* tlm_comp_callback) (tlm_component *comp_ptr, void *arg1, void *arg2) |
The callback type for each component
- See also
- tlm_component_for_each()
Function Documentation
tlm_component* tlm_component_add | ( | const char * | name | ) |
Adds a telemetry component by name.
- Parameters
-
name The persistent data pointer to the name of the telemetry component.
- Returns
- tlm_component pointer if this component added successfully, but NULL if another component already exists with this name.
void tlm_component_for_each | ( | tlm_comp_callback | callback, |
void * | arg1, | ||
void * | arg2 | ||
) |
Calls your callback function for each telemetry component added to the telemetry components list by tlm_component_add().
- Parameters
-
arg1 arg2 The arguments is passed to your callback like this: callback(tlm_component*, arg1, arg2)
tlm_component* tlm_component_get_by_name | ( | const char * | name | ) |
Get an existing telemetry component by name
- Returns
- NULL pointer if the component by name was not found