Class HeaderParser

Inheritance Relationships

Base Type

Class Documentation

class HeaderParser : public novatel_gps_driver::MessageParser<novatel_gps_msgs::msg::NovatelMessageHeader>

Parses the header in a typical NovAtel message.

Note that this parser is actually a little different from the others; it is used by the other parsers to parse headers in their messages, and it does not return a Ptr type because the headers in the ROS message classes are assigned by value.

Public Functions

virtual uint32_t GetMessageId() const override
Returns:

The binary message ID. Should be 0 for messages that have no binary representation.

virtual const std::string GetMessageName() const override
Returns:

The ASCII message name.

virtual MessageType ParseBinary(const BinaryMessage &bin_msg) noexcept(false) override

Converts bin_msg into a ROS message pointer and returns it.

The returned value must not be NULL. ParseException should be thrown if there are any issues parsing the message.

Parameters:

bin_msg[in] The message to convert.

Returns:

A valid ROS message pointer.

virtual MessageType ParseAscii(const NovatelSentence &sentence) noexcept(false) override

Converts sentence into a ROS message pointer and returns it.

The returned value must not be NULL. ParseException should be thrown if there are any issues parsing the message.

Parameters:

bin_msg[in] The message to convert.

Returns:

A valid ROS message pointer.

Public Static Attributes

static constexpr uint32_t BINARY_HEADER_LENGTH = 28