These functions and macros are to be used for manipulating binary data.
Classes | |
| class | CRCException |
| This is thrown when there is an error processing a CRC. More... | |
| class | CRCParam |
| Encapsulate parameters for CRC computation. More... | |
Functions | |
| template<class T> | |
| void | twiddle (T &p) throw () |
| Reverse bytes. | |
| template<class T> | |
| T | intelToHost (const T &p) throw () |
| Converts Intel little-endian to host byte order, const version. | |
| template<class T> | |
| T | hostToIntel (const T &p) throw () |
| Converts host byte order to Intel little-endian, const version. | |
| template<class T> | |
| T | netToHost (const T &p) throw () |
| Converts host byte order to network order, const version. | |
| template<class T> | |
| T | hostToNet (const T &p) throw () |
| Converts network byte order to host order, const version. | |
| template<class T> | |
| T | decodeVar (std::string &str, std::string::size_type pos=std::string::npos) |
| Remove (optinally) the item specified from the string and convert it from network byte order to host byte order. | |
| template<class T> | |
| std::string | encodeVar (const T &v) |
| Add the network ordered binary representation of a var to the the given string. | |
| unsigned long | reflect (unsigned long crc, int bitnum) |
| Reflects the lower bitnum bits of crc. | |
| unsigned long | computeCRC (const unsigned char *data, unsigned long len, const CRCParam ¶ms) |
| Compute CRC (suitable for polynomial orders from 1 to 32). | |
| template<class X> | |
| X | xorChecksum (const std::string &str) throw (gpstk::InvalidParameter) |
| Calculate an Exclusive-OR Checksum on the string /a str. | |
Variables | |
| const CRCParam | CRCCCITT (16, 0x1021, 0xffff, 0, true, false, false) |
| const CRCParam | CRC16 (16, 0x8005, 0, 0, true, true, true) |
| const CRCParam | CRC32 (32, 0x4c11db7, 0xffffffff, 0xffffffff, true, true, true) |
| const CRCParam | CRC24Q (24, 0x823ba9, 0, 0xffffffff, true, false, false) |
1.3.9.1