61 #ifndef __SIM_LOC_COLA_PARSER_H_INCLUDED 62 #define __SIM_LOC_COLA_PARSER_H_INCLUDED 116 static sick_scan::SickLocColaTelegramMsg
createColaTelegram(
const COLA_SOPAS_COMMAND & command_type,
117 const std::string & command_name,
const std::vector<std::string> & parameter = std::vector<std::string>());
127 static sick_scan::SickLocColaTelegramMsg
decodeColaTelegram(
const std::vector<uint8_t> & cola_binary);
142 static std::vector<uint8_t>
encodeColaTelegram(
const sick_scan::SickLocColaTelegramMsg & cola_telegram,
bool parameter_is_ascii =
true);
151 static std::vector<uint8_t>
encodeColaTelegram(
const COLA_SOPAS_COMMAND & command_type,
const std::string & command_name,
152 const std::vector<std::string> & parameter = std::vector<std::string>(),
bool parameter_is_ascii =
true);
230 #endif // __SIM_LOC_COLA_PARSER_H_INCLUDED class ColaParser parses and converts binary Cola telegrams to ros messages SickLocColaTelegramMsg and...
static std::vector< uint8_t > encodeColaTelegram(const sick_scan::SickLocColaTelegramMsg &cola_telegram, bool parameter_is_ascii=true)
Encodes and returns a Cola Binary telegram from ros message SickLocColaTelegramMsg.
COLA_SOPAS_COMMAND_ENUM
Enumeration of SOPAS commands in cola telegrams: The command_type in SickLocColaTelegramMsg is one of...
static sick_scan::SickLocColaTelegramMsg decodeColaTelegram(const std::vector< uint8_t > &cola_binary)
Decodes and returns a Cola message of type SickLocColaTelegramMsg from a Cola-Binary telegram...
static std::vector< uint8_t > binaryETX(void)
Returns the binary "end of text" tag in a Cola-Binary command, i.e. {0x03}.
Method by name (response)
static const std::string s_cola_ascii_end_tag
All Cola-ACSII telegrams start with s_cola_ascii_start_tag := "<ETX>" ("End of TeXt") ...
static const std::string s_command_type_string[MAX_COLA_COMMAND_NUMBER]
static table to convert COLA_SOPAS_COMMAND to string, f.e. s_command_type_string[sRN]:="sRN", s_command_type_string[sRA]:="sRA" and so on
enum sick_scan::ColaParser::COLA_SOPAS_COMMAND_ENUM COLA_SOPAS_COMMAND
Enumeration of SOPAS commands in cola telegrams: The command_type in SickLocColaTelegramMsg is one of...
uninitialized, command_type should never have this value)
Number of possible COLA_SOPAS_COMMANDs incl. invalid command.
static const std::string & asciiSTX(void)
Returns the "start of text" tag in a Cola ASCII command, i.e. "<STX>".
static std::string convertSopasCommand(COLA_SOPAS_COMMAND command_type)
Converts and returns a COLA_SOPAS_COMMAND to string. Example: convertSopasCommand(sMN) returns "sMN"...
static int32_t convertColaArg(const std::string &cola_arg, int base=10, int32_t default_value=0)
static sick_scan::SickLocColaTelegramMsg createColaTelegram(const COLA_SOPAS_COMMAND &command_type, const std::string &command_name, const std::vector< std::string > ¶meter=std::vector< std::string >())
Creates and returns a Cola telegram (type SickLocColaTelegramMsg).
static std::string ConvertColaAscii(const std::vector< uint8_t > &cola_telegram)
Converts and returns a Cola-ASCII telegram to string.
static const std::string s_cola_ascii_start_tag
All Cola-ACSII telegrams start with s_cola_ascii_start_tag := "<STX>" ("Start of TeXt") ...
static const std::string & asciiETX(void)
Returns the "end of text" tag in a Cola ASCII command, i.e. "<ETX>".
static bool convertColaResponseBool(const std::string &cola_response_arg, bool default_value)
Error Answer with error code (response)
static const std::map< std::string, COLA_SOPAS_COMMAND > s_command_type_map
static map to convert COLA_SOPAS_COMMANDs from string to enum, f.e. s_command_type_map["sRN"]:=sRN, s_command_type_map["sRA"]:=sRA and so on
static std::vector< uint8_t > binarySTX(void)
Returns the binary "start of text" tag in a Cola-Binary command, i.e. {0x02}.