Go to the documentation of this file.
44 #ifndef GNSSTK_BINEXDATA_HPP
45 #define GNSSTK_BINEXDATA_HPP
48 #include "gnsstk_export.h"
121 UBNXI(
unsigned long ul);
192 operator unsigned long()
const
218 decode(
const std::string& inBuffer,
220 bool littleEndian =
false);
233 encode(std::string& outBuffer,
235 bool littleEndian =
false)
const;
253 read(std::istream& strm,
254 std::string *outBuffer =
NULL,
257 bool littleEndian =
false);
274 write(std::ostream& strm,
275 std::string *outBuffer =
NULL,
278 bool littleEndian =
false)
const;
389 operator long long()
const
415 decode(
const std::string& inBuffer,
417 bool littleEndian =
false);
429 encode(std::string& outBuffer,
431 bool littleEndian =
false)
const;
447 read(std::istream& strm,
448 std::string *outBuffer =
NULL,
451 bool littleEndian =
false);
466 write(std::ostream& strm,
467 std::string *outBuffer =
NULL,
470 bool littleEndian =
false)
const;
520 dump(std::ostream& s)
const;
639 inline const std::string&
698 const std::string&
data,
744 if (size >
sizeof(T) )
746 std::ostringstream errStrm;
747 errStrm <<
"Invalid data size: " << size;
748 InvalidParameter ip(errStrm.str() );
752 msg.replace(offset, size,
reinterpret_cast<const char*
>(&
data), size);
757 std::reverse(
msg.begin()+offset,
msg.begin()+offset+size);
841 if (size >
sizeof(T) )
843 std::ostringstream errStrm;
844 errStrm <<
"Data size invalid: " << size;
845 InvalidParameter ip(errStrm.str() );
848 if (offset + size >
msg.size() )
850 std::ostringstream errStrm;
851 errStrm <<
"Message buffer offset invalid: " << offset;
852 InvalidParameter ip(errStrm.str() );
857 data = BinUtils::decodeVarLE<T>(
msg, offset);
859 data = BinUtils::decodeVar<T>(
msg, offset);
915 void getCRC(
const std::string& head,
916 const std::string& message,
917 std::string& crc)
const;
950 static unsigned long long
971 size_t n = std::string::npos);
984 #endif // GNSSTK_BINEXDATA_HPP
uint32_t RecordID
Record ID type.
size_t write(std::ostream &strm, std::string *outBuffer=NULL, size_t offset=0, bool reverseBytes=false, bool littleEndian=false) const
static const GNSSTK_EXPORT RecordID INVALID_RECORD_ID
void getCRC(const std::string &head, const std::string &message, std::string &crc) const
MGFZI & operator=(const MGFZI &right)
size_t decode(const std::string &inBuffer, size_t offset=0, bool littleEndian=false)
virtual void reallyPutRecord(FFStream &s) const
BinexData & updateMessageData(size_t &offset, const T &data, size_t size)
BinexData & setRecordFlags(SyncByte flags=DEFAULT_RECORD_FLAGS)
static unsigned long long parseBuffer(const std::string &buffer, size_t offset, size_t size)
BinexData & clearMessage()
bool operator<=(const MGFZI &other) const
void extractMessageData(size_t &offset, T &data, size_t size) const
size_t getCRCLength(size_t crcDataLen) const
bool operator>(const MGFZI &other) const
static const GNSSTK_EXPORT unsigned long MAX_VALUE
0
static const GNSSTK_EXPORT unsigned char MAX_BYTES
536870911
static void reverseBuffer(std::string &buffer, size_t offset=0, size_t n=std::string::npos)
UBNXI(const UBNXI &other)
static const GNSSTK_EXPORT SyncByte DEFAULT_RECORD_FLAGS
0xFFFFFFFF
bool operator>(const UBNXI &other) const
size_t read(std::istream &strm, std::string *outBuffer=NULL, size_t offset=0, bool reverseBytes=false, bool littleEndian=false)
bool operator<(const MGFZI &other) const
BinexData & operator=(const BinexData &right)
bool operator!=(const UBNXI &other) const
SyncByte syncByte
Flags for endianness, CRC, etc.
BinexData & ensureMessageCapacity(size_t cap)
static const GNSSTK_EXPORT bool nativeLittleEndian
virtual void dump(std::ostream &s) const
bool isHeadSyncByteValid(SyncByte headSync, SyncByte &expectedTailSync) const
std::string msg
Record message (opaque)
bool operator>=(const MGFZI &other) const
size_t getMessageLength() const
static const GNSSTK_EXPORT long long MIN_VALUE
RecordID getRecordID() const
static const GNSSTK_EXPORT SyncByte VALID_RECORD_FLAGS
0x20
MGFZI(const MGFZI &other)
size_t getTailLength() const
size_t decode(const std::string &inBuffer, size_t offset=0, bool littleEndian=false)
bool operator==(const UBNXI &other) const
bool operator==(const MGFZI &other) const
bool operator==(const BinexData &b) const
virtual bool isData(void) const
size_t encode(std::string &outBuffer, size_t offset=0, bool littleEndian=false) const
UBNXI & operator=(const UBNXI &right)
bool operator<=(const UBNXI &other) const
static void reverseBytes(T &val)
BinexData & updateMessageData(size_t &offset, const UBNXI &data)
bool operator<(const UBNXI &other) const
static const GNSSTK_EXPORT long long MAX_VALUE
-1157442765409226759LL
size_t write(std::ostream &strm, std::string *outBuffer=NULL, size_t offset=0, bool reverseBytes=false, bool littleEndian=false) const
static const GNSSTK_EXPORT unsigned long MIN_VALUE
virtual void putRecord(std::ostream &s) const
size_t encode(std::string &outBuffer, size_t offset=0, bool littleEndian=false) const
bool operator!=(const MGFZI &other) const
virtual size_t getRecord(std::istream &s)
#define GNSSTK_THROW(exc)
virtual void reallyGetRecord(FFStream &s)
const std::string & getMessageData() const
size_t getHeadLength() const
uint8_t SyncByte
Synchronization byte (record flags)
size_t getRecordSize() const
void extractMessageData(size_t &offset, UBNXI &data)
size_t read(std::istream &strm, std::string *outBuffer=NULL, size_t offset=0, bool reverseBytes=false, bool littleEndian=false)
BinexData & setRecordID(RecordID id)
static const GNSSTK_EXPORT unsigned char MAX_BYTES
1157442765409226759LL
bool operator>=(const UBNXI &other) const
bool isTailSyncByteValid(SyncByte tailSync, SyncByte &expectedHeadSync) const
SyncByte getRecordFlags() const
gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:38