59 #ifndef __SIM_LOC_COLA_CONVERTER_H_INCLUDED 60 #define __SIM_LOC_COLA_CONVERTER_H_INCLUDED 87 static std::string
ConvertColaAscii(
const std::vector<uint8_t> & cola_telegram);
95 static std::vector<uint8_t>
ConvertColaAscii(
const std::string & cola_telegram);
107 static std::vector<uint8_t>
ColaTelegramToColaBinary(
const sick_scan::SickLocColaTelegramMsg & cola_telegram,
int parameter_is_ascii = -1);
121 static std::vector<uint8_t>
ColaAsciiToColaBinary(
const std::vector<uint8_t> & cola_telegram,
int parameter_is_ascii = -1);
131 static std::vector<uint8_t>
ColaBinaryToColaAscii(
const std::vector<uint8_t> & cola_telegram,
bool parameter_to_ascii =
true);
139 static bool IsColaBinary(
const std::vector<uint8_t> & cola_telegram);
160 #endif // __SIM_LOC_COLA_CONVERTER_H_INCLUDED static uint32_t ColaBinaryTelegramLength(const std::vector< uint8_t > &cola_telegram)
Decodes the header and returns the length of a Cola-Binary telegram.
static bool IsColaBinary(const std::vector< uint8_t > &cola_telegram)
Returns true for Cola-Binary, if a given telegram is Cola-Binary encoded and starts with 4 Bytes { 0x...
static const std::string s_ascii_table[256]
static ascii table to convert binary to ascii, f.e. s_ascii_table[0x02]:="<STX>", s_ascii_table[0x03]...
static const std::map< std::string, uint8_t > s_ascii_map
static ascii map to convert ascii to binary, f.e. s_ascii_map["<STX>"]:=0x02, s_ascii_map["<ETX>"]:=0...
static std::vector< uint8_t > ColaAsciiToColaBinary(const std::vector< uint8_t > &cola_telegram, int parameter_is_ascii=-1)
Converts and returns a Cola telegram from Cola-ASCII to Cola-Binary.
class ColaAsciiBinaryConverter converts between Cola-ASCII and Cola-Binary telegrams. See Operation-Instruction-v1.1.0.241R.pdf, chapter 5.8 "About CoLa-A telegrams", page 46-48, Telegram-Listing-v1.1.0.241R.pdf, chapter 2.3.9 "Command: LocRequestTimestamp", page 21, and Technical_information_Telegram_Listing_NAV_LOC_en_IM0076556.PDF for further details about Cola telegrams.
static std::vector< uint8_t > ColaBinaryToColaAscii(const std::vector< uint8_t > &cola_telegram, bool parameter_to_ascii=true)
Converts and returns a Cola telegram from Cola-ASCII to Cola-Binary.
static std::string ConvertColaAscii(const std::vector< uint8_t > &cola_telegram)
Converts and returns a Cola-ASCII telegram to string.
static std::vector< uint8_t > ColaTelegramToColaBinary(const sick_scan::SickLocColaTelegramMsg &cola_telegram, int parameter_is_ascii=-1)
Converts and returns a Cola telegram to Cola-Binary.