37#ifndef UWINTERPRETERAHOI_H
38#define UWINTERPRETERAHOI_H
80 std::string
buildSend(ahoi::packet_t pck);
192 std::string
findResponse(std::vector<char>::iterator beg,
193 std::vector<char>::iterator end,
194 std::vector<char>::iterator &rsp_beg,
195 std::vector<char>::iterator &rsp_end);
204 std::vector<char>::iterator &c_beg,
205 std::vector<char>::iterator &c_end);
216 std::vector<char>::iterator c_beg,
217 std::vector<char>::iterator c_end);
Class used for building syntactically compliant commands to send to the ahoi! modems and interpreting...
std::string buildReset()
Method that builds the command.
std::string buildAgc()
Method that builds the command.
std::string buildBatVol()
Method that builds the command.
std::string buildSfdStat()
Method that builds the command.
std::string buildDistance()
Method that builds the command.
static const uint8_t etx
Ending sequence.
std::string buildID(int id)
Method that builds the command to ask the modem its own ID number.
void fixEscapes(std::vector< char > &buffer, std::vector< char >::iterator &c_beg, std::vector< char >::iterator &c_end)
Method that erases an escape (DLE) char if part of 2-cahrs escape sequence.
std::string buildSyncStat()
Method that builds the command.
std::string buildRangeDelay()
Method that builds the command.
std::string buildAllStatReset()
Method that builds the command.
std::string buildSfdStatReset()
Method that builds the command.
~UwInterpreterAhoi()
Destructor of the interpreter class.
std::shared_ptr< ahoi::packet_t > parseResponse(std::vector< char >::iterator c_beg, std::vector< char >::iterator c_end)
Method that parses a region of memory where a response was previously found.
std::array< uint8_t, 2 > beg_del
Beginning delimiter.
static uint footer_size
Standard ahoi! packet has 6 bytes of header.
std::string buildPacketStat()
Method that builds the command.
static uint header_size
Standard ahoi! packet has 6 bytes of header.
std::string buildAllStat()
Method that builds the command.
std::string buildSyncStatReset()
Method that builds the command.
std::string serializePacket(ahoi::packet_t *packet)
Serialize the provided packet.
uint8_t id
Identifier of the modem: to fill the src addres field.
uint8_t sn
Sequence number for commands tranmission: at end restart.
std::array< uint8_t, 2 > end_del
Ending delimiter.
std::string buildRange()
Method that builds the command.
std::string findResponse(std::vector< char >::iterator beg, std::vector< char >::iterator end, std::vector< char >::iterator &rsp_beg, std::vector< char >::iterator &rsp_end)
Method that looks for ahoi! modem responses.
std::string buildTxGain()
Method that builds the command.
std::string buildRxGain()
Method that builds the command.
std::string buildPacketStatReset()
Method that builds the command.
static const uint8_t stx
Starting sequence.
std::string buildSend(ahoi::packet_t pck)
Method that builds the command to send a given message.