Skip to content
Snippets Groups Projects
rs485.hpp 859 B
Newer Older
Zoe Pfister's avatar
Zoe Pfister committed
#ifndef _RS485
#define _RS485

#include <SentecSolarRadiationSensor.h>
#include <SentecRainGaugeSensor.h>
Zoe Pfister's avatar
Zoe Pfister committed
#include "Message.hpp"
#include "ForteSensor.hpp"
Zoe Pfister's avatar
Zoe Pfister committed

  out_data_solar_radiation solar;
  out_data_rain_gauge precipitation;
Zoe Pfister's avatar
Zoe Pfister committed
};

class Forte_RS485: public ForteSensor<out_data_rs485> {
 public:
  void setup() override;
  out_data_rs485 readData() override;
  std::list<Message> buildMessages() override;
  [[nodiscard]] SensorInformation getSensorInformation() const override;
  void teardown();
  static void powerOnRS485Sensors();
  static void powerOffRS485Sensors();
Zoe Pfister's avatar
Zoe Pfister committed

  const SensorInformation
      sensorInformation{HardwareName::RS485, SensorProtocol::RS485};
Zoe Pfister's avatar
Zoe Pfister committed

};
#endif