32 template <
class MSG_CLASS>
33 bool isOfClass()
const {
return isOfType(MSG_CLASS::msg_type); }
73 #define GNSS_MESSAGE_BINARY_BLOCK(DATA_PTR,DATA_LEN) \
75 void internal_writeToStream(mrpt::utils::CStream &out) const MRPT_OVERRIDE { \
76 out << static_cast<uint32_t>(DATA_LEN); out.WriteBuffer(DATA_PTR,DATA_LEN); } \
77 void internal_readFromStream(mrpt::utils::CStream &in) MRPT_OVERRIDE { \
78 uint32_t nBytesInStream; in >> nBytesInStream; \
79 ASSERT_EQUAL_(nBytesInStream,DATA_LEN); \
80 in.ReadBuffer(DATA_PTR,DATA_LEN); } \
83 #define GNSS_BINARY_MSG_DEFINITION_START(_MSG_ID) \
84 struct OBS_IMPEXP Message_##_MSG_ID : public gnss_message { \
85 GNSS_MESSAGE_BINARY_BLOCK(&fields,sizeof(fields)) \
86 enum { msg_type = _MSG_ID }; \
87 Message_##_MSG_ID() : gnss_message((gnss_message_type_t)msg_type) {} \
88 struct OBS_IMPEXP content_t {
90 #define GNSS_BINARY_MSG_DEFINITION_MID \
91 content_t() { ::memset(this,0,sizeof(*this)); } \
94 void dumpToStream( mrpt::utils::CStream &out ) const MRPT_OVERRIDE;
97 #define GNSS_BINARY_MSG_DEFINITION_MID_END \
100 #define GNSS_BINARY_MSG_DEFINITION_END \
101 GNSS_BINARY_MSG_DEFINITION_MID \
102 GNSS_BINARY_MSG_DEFINITION_MID_END
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
GLsizei const GLchar ** string
bool operator!=(const TPoint2D &p1, const TPoint2D &p2)
Exact comparison between 2D points.
bool operator==(const TPoint2D &p1, const TPoint2D &p2)
Exact comparison between 2D points.
uint64_t TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1,...
gnss_message_type_t
List of all known GNSS message types.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
UTC (Coordinated Universal Time) time-stamp structure for GPS messages.
A smart pointer to a GNSS message.
const gnss_message * get() const
Pure virtual base for all message types.
void dumpToConsole(std::ostream &o=std::cout) const
Dumps the contents of the observation in a human-readable form to an std::ostream (default=console)
gnss_message_type_t message_type
Type of GNSS message.
virtual bool getAllFieldValues(std::ostream &o) const
Dumps a line with the sequence of all field values (without a line feed at the end).
virtual void internal_readFromStream(mrpt::utils::CStream &in)=0
Save to binary stream. Launches an exception upon error.
virtual void dumpToStream(mrpt::utils::CStream &out) const =0
Dumps the contents of the observation in a human-readable form to a given output stream.
virtual bool getAllFieldDescriptions(std::ostream &o) const
Dumps a header for getAllFieldValues()
virtual void internal_writeToStream(mrpt::utils::CStream &out) const =0
Save to binary stream. Launches an exception upon error.
bool isOfType(const gnss_message_type_t type_id) const
gnss_message(gnss_message_type_t msg_type_id)