BinUtils.hpp File Reference


Detailed Description

Binary manipulation functions.

Definition in file BinUtils.hpp.

#include "gpstkplatform.h"
#include "Exception.hpp"

Include dependency graph for BinUtils.hpp:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Namespaces

namespace  gpstk
namespace  gpstk::BinUtils

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>
intelToHost (const T &p) throw ()
 Converts Intel little-endian to host byte order, const version.
template<class T>
hostToIntel (const T &p) throw ()
 Converts host byte order to Intel little-endian, const version.
template<class T>
netToHost (const T &p) throw ()
 Converts host byte order to network order, const version.
template<class T>
hostToNet (const T &p) throw ()
 Converts network byte order to host order, const version.
template<class 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 &params)
 Compute CRC (suitable for polynomial orders from 1 to 32).
template<class X>
xorChecksum (const std::string &str) throw (gpstk::InvalidParameter)
 Calculate an Exclusive-OR Checksum on the string /a str.


Generated on Tue Feb 7 03:31:06 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1