#include <comms.h>
Public Member Functions | |
Comms (serial::Serial *s) | |
int16_t | receive (Registers *r) |
void | send (const Accessor_ &a) const |
bool | sendWaitAck (const Accessor_ &a) |
Static Public Member Functions | |
static std::string | checksum (const std::string &s) |
static std::string | message (uint8_t address, std::string data) |
Static Public Attributes | |
static const uint8_t | PACKET_BATCH_LENGTH_MASK = 0x0F |
static const uint8_t | PACKET_BATCH_LENGTH_OFFSET = 2 |
static const uint8_t | PACKET_HAS_DATA = 1 << 7 |
static const uint8_t | PACKET_IS_BATCH = 1 << 6 |
Private Attributes | |
bool | first_spin_ |
serial::Serial * | serial_ |
um6::Comms::Comms | ( | serial::Serial * | s | ) | [inline, explicit] |
std::string um6::Comms::checksum | ( | const std::string & | s | ) | [static] |
std::string um6::Comms::message | ( | uint8_t | address, |
std::string | data | ||
) | [static] |
int16_t um6::Comms::receive | ( | Registers * | r = NULL | ) |
void um6::Comms::send | ( | const Accessor_ & | a | ) | const |
bool um6::Comms::sendWaitAck | ( | const Accessor_ & | a | ) |
bool um6::Comms::first_spin_ [private] |
const uint8_t um6::Comms::PACKET_BATCH_LENGTH_MASK = 0x0F [static] |
const uint8_t um6::Comms::PACKET_BATCH_LENGTH_OFFSET = 2 [static] |
const uint8_t um6::Comms::PACKET_HAS_DATA = 1 << 7 [static] |
const uint8_t um6::Comms::PACKET_IS_BATCH = 1 << 6 [static] |
serial::Serial* um6::Comms::serial_ [private] |