37#ifndef UWINTERPRETERS2C_H
38#define UWINTERPRETERS2C_H
124 std::string
buildSend(std::string msg,
int dest);
135 std::string
buildSendIM(std::string msg,
int dest,
bool ack);
203 std::vector<char>::iterator end, std::vector<char>::iterator &rsp);
220 std::vector<char>::iterator end,
221 std::vector<char>::iterator rsp_beg,
222 std::vector<char>::iterator &rsp_end, std::string &rx_payload);
252 static std::vector<std::pair<std::string, UwInterpreterS2C::Response> >
virtual ~UwInterpreterS2C()
Class destructor.
static std::vector< std::pair< std::string, UwInterpreterS2C::Response > > syntax_pool
Vector holding all possible commands for the S2C syntax and corresponding identifying token.
std::string buildATDI()
Method that builds the command to check the IM delivery status.
bool ext_proto_mode
Flag telling if Extened Protol Mode is in use.
std::shared_ptr< USBLInfo > getUSBLInfo()
Method to retrieve the USBL information saved upon reception of a USBL message.
std::string buildATV()
Method that builds the command to ask for current settings: it enlists source level,...
UwInterpreterS2C()
Class constructor.
Response
Enum listing the types of commands that could be received or sent by a S2C device; See the EvoLogics ...
std::string buildSetATAL(int addr)
Method that builds the command to set the local address of the device.
std::string buildATZ(int level)
Method that builds a reboot sequence: depending on the provided index different levels of reset can b...
std::string buildGetATL()
Method that builds the command to get the source level of the device.
std::string w_term
Terminating sequence for commands wrtten to device.
UwInterpreterS2C::Response findResponse(std::vector< char >::iterator beg, std::vector< char >::iterator end, std::vector< char >::iterator &rsp)
Method to look for S2C response inside a provided chunk of unparsed data This method only finds the b...
bool parseResponse(UwInterpreterS2C::Response rsp, std::vector< char >::iterator end, std::vector< char >::iterator rsp_beg, std::vector< char >::iterator &rsp_end, std::string &rx_payload)
Method that tries to parse a found response: if the response section of the buffer,...
std::string sep
Separator for paramters fo the commands: a comma.
void setExtProtoMode(bool enabled)
Method that sets whether Extended Protocol Mode is used or not.
std::string r_term
Terminating sequence for commands read from device.
std::string buildSendIM(std::string msg, int dest, bool ack)
Method that builds the command to send data through SENDIM command SENDIM is used to send Instant Mes...
std::shared_ptr< USBLInfo > usbl_info
Strucure holding info retrived via USBL message.
std::string buildATS()
Method that builds the command to ask for modem status: it enlists local address, acoustic link statu...
std::string buildSetATL(int level)
Method that builds the command to set the source level of the device.
std::string buildSend(std::string msg, int dest)
Method that builds the command to send data through SEND command SEND is used to send burst data: pay...
std::string buildGetATAL()
Method that builds the command to set the local address of the device.
Structure holding the info retreived via USBL message.