JaiaBot  1.19.0
JaiaBot micro-AUV software
jaiabot::comms Namespace Reference

Classes

struct  Packet
 
class  UDPDriver
 
class  XBeeDevice
 
class  XBeeDriver
 

Typedefs

typedef unsigned char byte
 
typedef uint64_t SerialNumber
 
typedef std::string NodeId
 

Enumerations

enum  NodeType { NodeType::HUB, NodeType::BOT }
 

Functions

void check_bot_id_bounds (int bot_id)
 
void check_hub_id_bounds (int hub_id)
 
int hub_modem_id (unsigned subnet_mask, jaiabot::protobuf::Link link)
 
int modem_id_from_bot_id (int bot_id, unsigned subnet_mask, jaiabot::protobuf::Link link)
 
int bot_id_from_modem_id (int modem_id, unsigned subnet_mask)
 
jaiabot::protobuf::Link link_from_modem_id (int modem_id, unsigned subnet_mask)
 
template<typename DCCLMessageWithLinkField >
void set_link_type (DCCLMessageWithLinkField &msg, int src_modem_id, unsigned subnet_mask)
 
SerialNumber serial_from_node_data (NodeType type, int fleet_id, int bot_or_hub_id)
 

Variables

constexpr int broadcast_modem_id {goby::acomms::BROADCAST_ID}
 
constexpr int hub_base_modem_id {1}
 
constexpr int bot0_base_modem_id {2}
 
constexpr int bot_id_min {0}
 
constexpr int bot_id_max {150}
 
constexpr int bot_id_total {bot_id_max - bot_id_min + 1}
 
constexpr int hub_id_min {0}
 
constexpr int hub_id_max {30}
 
constexpr int hub_id_total {hub_id_max - hub_id_min + 1}
 

Typedef Documentation

◆ byte

typedef unsigned char jaiabot::comms::byte

Definition at line 46 of file xbee.h.

◆ NodeId

typedef std::string jaiabot::comms::NodeId

Definition at line 54 of file xbee.h.

◆ SerialNumber

typedef uint64_t jaiabot::comms::SerialNumber

Definition at line 51 of file xbee.h.

Enumeration Type Documentation

◆ NodeType

Enumerator
HUB 
BOT 

Definition at line 56 of file xbee.h.

Function Documentation

◆ bot_id_from_modem_id()

int jaiabot::comms::bot_id_from_modem_id ( int  modem_id,
unsigned  subnet_mask 
)
inline

Definition at line 83 of file comms.h.

◆ check_bot_id_bounds()

void jaiabot::comms::check_bot_id_bounds ( int  bot_id)
inline

Definition at line 48 of file comms.h.

◆ check_hub_id_bounds()

void jaiabot::comms::check_hub_id_bounds ( int  hub_id)
inline

Definition at line 59 of file comms.h.

◆ hub_modem_id()

int jaiabot::comms::hub_modem_id ( unsigned  subnet_mask,
jaiabot::protobuf::Link  link 
)
inline

Definition at line 70 of file comms.h.

◆ link_from_modem_id()

jaiabot::protobuf::Link jaiabot::comms::link_from_modem_id ( int  modem_id,
unsigned  subnet_mask 
)
inline

Definition at line 91 of file comms.h.

◆ modem_id_from_bot_id()

int jaiabot::comms::modem_id_from_bot_id ( int  bot_id,
unsigned  subnet_mask,
jaiabot::protobuf::Link  link 
)
inline

Definition at line 76 of file comms.h.

◆ serial_from_node_data()

SerialNumber jaiabot::comms::serial_from_node_data ( NodeType  type,
int  fleet_id,
int  bot_or_hub_id 
)
inline

Definition at line 62 of file xbee.h.

◆ set_link_type()

template<typename DCCLMessageWithLinkField >
void jaiabot::comms::set_link_type ( DCCLMessageWithLinkField &  msg,
int  src_modem_id,
unsigned  subnet_mask 
)

Definition at line 102 of file comms.h.

Variable Documentation

◆ bot0_base_modem_id

constexpr int jaiabot::comms::bot0_base_modem_id {2}
constexpr

Definition at line 38 of file comms.h.

◆ bot_id_max

constexpr int jaiabot::comms::bot_id_max {150}
constexpr

Definition at line 41 of file comms.h.

◆ bot_id_min

constexpr int jaiabot::comms::bot_id_min {0}
constexpr

Definition at line 40 of file comms.h.

◆ bot_id_total

constexpr int jaiabot::comms::bot_id_total {bot_id_max - bot_id_min + 1}
constexpr

Definition at line 42 of file comms.h.

◆ broadcast_modem_id

constexpr int jaiabot::comms::broadcast_modem_id {goby::acomms::BROADCAST_ID}
constexpr

Definition at line 36 of file comms.h.

◆ hub_base_modem_id

constexpr int jaiabot::comms::hub_base_modem_id {1}
constexpr

Definition at line 37 of file comms.h.

◆ hub_id_max

constexpr int jaiabot::comms::hub_id_max {30}
constexpr

Definition at line 45 of file comms.h.

◆ hub_id_min

constexpr int jaiabot::comms::hub_id_min {0}
constexpr

Definition at line 44 of file comms.h.

◆ hub_id_total

constexpr int jaiabot::comms::hub_id_total {hub_id_max - hub_id_min + 1}
constexpr

Definition at line 46 of file comms.h.