MBot Software Library  v1.0
An API documentation to mbot_firmware repository
Classes | Macros | Typedefs | Functions | Variables
Protocol
Collaboration diagram for Protocol:

Classes

struct  topic_registry_val
 
struct  topic_registry_entry
 

Macros

#define MAX_RADIX_TOPICS   16
 

Typedefs

typedef int(* Deserialize) (uint8_t *src, void *dest)
 
typedef int(* Serialize) (void *src, uint8_t *dest)
 
typedef void(* MsgCb) (void *data)
 
typedef struct topic_registry_val topic_registry_val_t
 
typedef struct topic_registry_entry topic_registry_entry_t
 

Functions

int comms_init_protocol (void)
 
int comms_register_topic (uint16_t topic_id, uint32_t topic_data_len, Deserialize deserialize_fn, Serialize serialize_fn, MsgCb callback_fn)
 
int comms_get_topic_serializers (uint16_t topic_id, topic_registry_val_t *topic_reg_val)
 
int comms_generate_packet (uint16_t topic_id, void *topic_struct, uint8_t **packet_out, uint32_t *packet_len_out)
 
int comms_send_serial (uint8_t *packet_out, uint32_t packet_len)
 
int comms_write_topic_test (uint16_t topic_id, void *topic_struct)
 
int comms_write_topic (uint16_t topic_id, void *topic_struct)
 

Variables

uint16_t topic_registry_val::topic_id
 
int32_t topic_registry_val::topic_data_len
 
Deserialize topic_registry_val::deserialize_fn
 
Serialize topic_registry_val::serialize_fn
 
MsgCb topic_registry_val::cb_fn
 
struct topic_registry_entrytopic_registry_entry::left
 
struct topic_registry_entrytopic_registry_entry::right
 
struct topic_registry_valtopic_registry_entry::value
 
topic_registry_entry_ttopic_registry_root_node
 

Detailed Description

<comms/protocol.h>