32 template <
class MSG_CLASS>
33 bool isOfClass()
const {
return isOfType(MSG_CLASS::msg_type); }
40 void dumpToConsole(std::ostream &o = std::cout)
const;
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 123 #pragma pack(pop) // End of pack = 1 uint64_t TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1...
bool operator==(const TPoint2D &p1, const TPoint2D &p2)
Exact comparison between 2D points.
UTC (Coordinated Universal Time) time-stamp structure for GPS messages.
gnss_message_type_t
List of all known GNSS message types.
bool operator!=(const TPoint2D &p1, const TPoint2D &p2)
Exact comparison between 2D points.
gnss_message(gnss_message_type_t msg_type_id)
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
virtual bool getAllFieldValues(std::ostream &o) const
Dumps a line with the sequence of all field values (without a line feed at the end).
gnss_message_type_t message_type
Type of GNSS message.
GLsizei const GLchar ** string
virtual bool getAllFieldDescriptions(std::ostream &o) const
Dumps a header for getAllFieldValues()
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Pure virtual base for all message types.
A smart pointer to a GNSS message.