Telemetry

Telemetry Public telemetry interface. More...

Functions

 CSP_DEFINE_TASK (telemetry_rx_task)
 Task used to receive incoming data from telemetry publishers. More...
 
void telemetry_init (void)
 Performs basic telemetry connection and thread initialization. More...
 
void telemetry_cleanup (void)
 Performs cleanup on telemetry resources & threads. More...
 
pubsub_conn * telemetry_connect (void)
 Connects to the telemetry system - thread safe version. More...
 
pubsub_conn * kprv_telemetry_connect (void)
 Internal connect function - not thread safe. More...
 
bool telemetry_subscribe (const pubsub_conn *conn, uint16_t topic_id)
 Subscribes the pubsub_conn to the specified topic. More...
 
bool telemetry_disconnect (pubsub_conn *conn)
 Disconnects from the telemetry system. More...
 
bool telemetry_unsubscribe (const pubsub_conn *conn, uint16_t topic_id)
 Unsubscribes a connection from a specific topic. More...
 
bool telemetry_read (const pubsub_conn *conn, telemetry_packet *packet)
 Reads a telemetry packet from the telemetry server. More...
 
bool telemetry_publish (telemetry_packet packet)
 Public facing telemetry input interface. More...
 
int telemetry_num_subscribers (void)
 
bool telemetry_is_subscribed (const pubsub_conn *client_conn, uint16_t topic_id)
 Checks if a telemetry client is subscribed to a topic. More...
 

Function Documentation

CSP_DEFINE_TASK ( telemetry_rx_task  )

Task used to receive incoming data from telemetry publishers.

pubsub_conn* kprv_telemetry_connect ( void  )

Internal connect function - not thread safe.

Returns
pubsub_conn* to pubsub_conn which will be used to receive future telemetry data
void telemetry_cleanup ( void  )

Performs cleanup on telemetry resources & threads.

pubsub_conn* telemetry_connect ( void  )

Connects to the telemetry system - thread safe version.

Returns
pubsub_conn* to pubsub_conn which will be used to receive future telemetry data.
bool telemetry_disconnect ( pubsub_conn *  conn)

Disconnects from the telemetry system.

Parameters
connpointer to pubsub_conn which is to be disconnected
Returns
bool true if successful, otherwise false
void telemetry_init ( void  )

Performs basic telemetry connection and thread initialization.

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

bool telemetry_is_subscribed ( const pubsub_conn *  client_conn,
uint16_t  topic_id 
)

Checks if a telemetry client is subscribed to a topic.

Parameters
client_conntelemetry client
topic_idtopic to check for
Returns
bool true if subscribed, otherwise false
int telemetry_num_subscribers ( void  )
Returns
int number of active telemetry subscribers
bool telemetry_publish ( telemetry_packet  packet)

Public facing telemetry input interface.

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

Parameters
packettelemetry_packet to publish
Returns
bool true if successful, otherwise false
bool telemetry_read ( const pubsub_conn *  conn,
telemetry_packet packet 
)

Reads a telemetry packet from the telemetry server.

Parameters
connpubsub_connection to use for the request
packetpointer to telemetry_packet to store data in.
Returns
bool true if successful, otherwise false
bool telemetry_subscribe ( const pubsub_conn *  conn,
uint16_t  topic_id 
)

Subscribes the pubsub_conn to the specified topic.

Parameters
connpointer to pubsub_conn
topic_idtopic to subscribe to
Returns
bool true if successful, otherwise false
bool telemetry_unsubscribe ( const pubsub_conn *  conn,
uint16_t  topic_id 
)

Unsubscribes a connection from a specific topic.

Parameters
connpointer to pubsub_conn which is to be unsubscribed
topic_idtopic to remove subscription from
Returns
bool true if successful, otherwise false