c_tlm_stream.c File Reference
#include "c_tlm_stream.h"
#include "c_tlm_var.h"
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <inttypes.h>
Include dependency graph for c_tlm_stream.c:

Functions | |
void | tlm_stream_one (tlm_component *comp, stream_callback_type stream, void *print_ascii, void *sca) |
void | tlm_stream_all (stream_callback_type stream_func, void *arg, bool ascii) |
void | tlm_stream_one_file (tlm_component *comp_ptr, FILE *file) |
void | tlm_stream_all_file (FILE *file) |
bool | tlm_stream_decode_file (FILE *file) |
Function Documentation
void tlm_stream_all | ( | stream_callback_type | stream_func, |
void * | arg, | ||
bool | ascii | ||
) |
Streams the telemetry for ALL registered components and their variables
- Parameters
-
stream_func The callback stream function that will receive the strings to print arg This argument will be passed to your stream function as its argument ascii If true, ASCII values are printed, rather than hex value of the data
void tlm_stream_all_file | ( | FILE * | file | ) |
Streams all components to a file
- Parameters
-
file Could be stdout, stderr, or an opened file handle Example: To printf the telemetry, just use "tlm_stream_all_file(stdio);"
bool tlm_stream_decode_file | ( | FILE * | file | ) |
This is similar to tlm_stream_decode(char*) except that it decodes stream from an opened file handle. The file will be read until fgets() fails.
- Returns
- true when telemetry decode finds correct stream header.
void tlm_stream_one | ( | tlm_component * | comp, |
stream_callback_type | stream, | ||
void * | print_ascii, | ||
void * | sca | ||
) |
Callback function for each component
- Parameters
-
sca Stream callback argument
void tlm_stream_one_file | ( | tlm_component * | comp_ptr, |
FILE * | file | ||
) |
Streams your provided component telemetry into a file pointer
- Parameters
-
comp_ptr The telemetry component pointer file Could be stdout, stderr, or an opened file handle