General Telemetry

void telemetry_init(void)

Performs basic telemetry connection and thread initialization.

To be used in the main() prior to starting the scheduler.

void telemetry_client_init(void)

Performs basic telemetry client connection and thread initialization.

Note
This function is only used by telemetry under Kubos RT

void telemetry_cleanup(void)

Performs cleanup on telemetry resources & threads.

bool telemetry_connect(socket_conn *conn)

Connects to the telemetry system - thread safe version.

Return
socket_conn* to socket_conn which will be used to receive future telemetry data.

bool kprv_telemetry_connect(socket_conn *conn)

Internal connect function - not thread safe.

Return
socket_conn* to socket_conn which will be used to receive future telemetry data

bool telemetry_subscribe(const socket_conn *conn, uint16_t topic_id)

Subscribes the socket_conn to the specified topic.

Return
bool true if successful, otherwise false
Parameters
  • conn: pointer to socket_conn
  • topic_id: topic to subscribe to

bool telemetry_disconnect(socket_conn *conn)

Disconnects from the telemetry system.

Return
bool true if successful, otherwise false
Parameters
  • conn: pointer to socket_conn which is to be disconnected

bool telemetry_unsubscribe(const socket_conn *conn, uint16_t topic_id)

Unsubscribes a connection from a specific topic.

Return
bool true if successful, otherwise false
Parameters
  • conn: pointer to socket_conn which is to be unsubscribed
  • topic_id: topic to remove subscription from

bool telemetry_read(const socket_conn *conn, telemetry_packet *packet)

Reads a telemetry packet from the telemetry server.

Return
bool true if successful, otherwise false
Parameters
  • conn: socket_connection to use for the request
  • packet: pointer to telemetry_packet to store data in.

bool telemetry_publish(telemetry_packet packet)

Public facing telemetry input interface.

Takes a telemetry_packet packet and passes it through the telemetry system.

Return
bool true if successful, otherwise false
Parameters

int telemetry_num_subscribers(void)

Return
int number of active telemetry subscribers

bool telemetry_is_subscribed(const socket_conn *client_conn, int topic_id)

Checks if a telemetry client is subscribed to a topic.

Return
bool true if subscribed, otherwise false
Parameters
  • client_conn: telemetry client
  • topic_id: topic to check for