Program Listing for File ublox_firmware.hpp
↰ Return to documentation for file (/tmp/ws/src/ublox/ublox_gps/include/ublox_gps/ublox_firmware.hpp
)
#ifndef UBLOX_GPS_UBLOX_FIRMWARE_HPP
#define UBLOX_GPS_UBLOX_FIRMWARE_HPP
#include <memory>
#include <diagnostic_updater/diagnostic_updater.hpp>
#include <rclcpp/rclcpp.hpp>
#include <ublox_gps/component_interface.hpp>
#include <ublox_gps/gnss.hpp>
// This file declares UbloxFirmware is an abstract class which implements
// ComponentInterface and functions generic to all firmware (such as the
// initializing the fix diagnostics).
namespace ublox_node {
class UbloxFirmware : public virtual ComponentInterface {
public:
constexpr static uint32_t kNavSvInfoSubscribeRate = 20;
explicit UbloxFirmware(std::shared_ptr<diagnostic_updater::Updater> updater, std::shared_ptr<Gnss> gnss, rclcpp::Node* node);
void initializeRosDiagnostics() override;
protected:
virtual void fixDiagnostic(
diagnostic_updater::DiagnosticStatusWrapper& stat) = 0;
std::shared_ptr<diagnostic_updater::Updater> updater_;
std::shared_ptr<Gnss> gnss_;
int fix_status_service_{0};
rclcpp::Node* node_;
};
} // namespace ublox_node
#endif // UBLOX_GPS_UBLOX_FIRMWARE_HPP