JaiaBot 3.0.0
JaiaBot micro-AUV software
Loading...
Searching...
No Matches
jaiabot::serial Namespace Reference

Classes

class  SerialThreadCRC32
 Reads/Writes message packages from/to serial port. More...

Functions

std::shared_ptr< goby::middleware::protobuf::IOData > encode_for_mcu (const google::protobuf::Message &pb_msg)
template<typename ProtobufMessage>
ProtobufMessage decode_from_mcu (const goby::middleware::protobuf::IOData &io_msg)
static const std::shared_ptr< goby::middleware::protobuf::IOData > encode_frame (const std::string &data)
static const std::string decode_frame (const std::string &frame_data)

Variables

constexpr int bits_in_byte = 8
constexpr int bytes_in_crc32 = 4
constexpr const char * SERIAL_MAGIC = "JAIA"
constexpr int SERIAL_MAGIC_BYTES = 4
constexpr int SIZE_BYTES = 2
constexpr int BITS_IN_BYTE = 8
constexpr auto SERIAL_MAX_SIZE = 2048
constexpr auto CRC_SIZE = 4

Function Documentation

◆ decode_frame()

const std::string jaiabot::serial::decode_frame ( const std::string & frame_data)
static

Definition at line 63 of file serial_crc32.h.

◆ decode_from_mcu()

template<typename ProtobufMessage>
ProtobufMessage jaiabot::serial::decode_from_mcu ( const goby::middleware::protobuf::IOData & io_msg)

Definition at line 33 of file mcu.h.

◆ encode_for_mcu()

std::shared_ptr< goby::middleware::protobuf::IOData > jaiabot::serial::encode_for_mcu ( const google::protobuf::Message & pb_msg)
inline

Definition at line 17 of file mcu.h.

◆ encode_frame()

const std::shared_ptr< goby::middleware::protobuf::IOData > jaiabot::serial::encode_frame ( const std::string & data)
static

Definition at line 46 of file serial_crc32.h.

Variable Documentation

◆ BITS_IN_BYTE

int jaiabot::serial::BITS_IN_BYTE = 8
constexpr

Definition at line 41 of file serial_crc32.h.

◆ bits_in_byte

int jaiabot::serial::bits_in_byte = 8
constexpr

Definition at line 13 of file mcu.h.

◆ bytes_in_crc32

int jaiabot::serial::bytes_in_crc32 = 4
constexpr

Definition at line 14 of file mcu.h.

◆ CRC_SIZE

auto jaiabot::serial::CRC_SIZE = 4
constexpr

Definition at line 43 of file serial_crc32.h.

◆ SERIAL_MAGIC

const char* jaiabot::serial::SERIAL_MAGIC = "JAIA"
constexpr

Definition at line 38 of file serial_crc32.h.

◆ SERIAL_MAGIC_BYTES

int jaiabot::serial::SERIAL_MAGIC_BYTES = 4
constexpr

Definition at line 39 of file serial_crc32.h.

◆ SERIAL_MAX_SIZE

auto jaiabot::serial::SERIAL_MAX_SIZE = 2048
constexpr

Definition at line 42 of file serial_crc32.h.

◆ SIZE_BYTES

int jaiabot::serial::SIZE_BYTES = 2
constexpr

Definition at line 40 of file serial_crc32.h.