#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_ |
um7::Comms::Comms | ( | serial::Serial * | s | ) | [inline, explicit] |
std::string um7::Comms::checksum | ( | const std::string & | s | ) | [static] |
std::string um7::Comms::message | ( | uint8_t | address, |
std::string | data | ||
) | [static] |
int16_t um7::Comms::receive | ( | Registers * | r = NULL | ) |
void um7::Comms::send | ( | const Accessor_ & | a | ) | const |
bool um7::Comms::sendWaitAck | ( | const Accessor_ & | a | ) |
bool um7::Comms::first_spin_ [private] |
const uint8_t um7::Comms::PACKET_BATCH_LENGTH_MASK = 0x0F [static] |
const uint8_t um7::Comms::PACKET_BATCH_LENGTH_OFFSET = 2 [static] |
const uint8_t um7::Comms::PACKET_HAS_DATA = 1 << 7 [static] |
const uint8_t um7::Comms::PACKET_IS_BATCH = 1 << 6 [static] |
serial::Serial* um7::Comms::serial_ [private] |