Class Driver

Inheritance Relationships

Base Type

Class Documentation

class Driver : public off_highway_premium_radar::Sender

Driver class to receive and send to / from sensor.

Provides sender interface to send data.

Public Types

using Receivers = std::vector<Receiver::SharedPtr>

Public Functions

explicit Driver(const std::string &host_ip, const int host_port, const std::string &sensor_ip, const int sensor_port, bool connect)

Construct a new Driver object.

Parameters:
  • host_ip – Host IP

  • host_port – Host port

  • sensor_ip – Sensor IP

  • sensor_port – Sensor port

  • connect – Connect UDP socket to receive only from sensor (won’t receive broadcast msgs)

virtual ~Driver() = default

Destroy the Driver object.

void start_receiving()

Start receiving packets.

inline void register_receiver(Receiver::SharedPtr receiver)

Register new receiver to trigger on new packets.

Parameters:

receiverReceiver to register

inline virtual bool send_ego_vehicle_data(EgoVehicleInput &data) override

Send ego vehicle data.

Parameters:

data – Ego vehicle data

inline virtual bool send_measurement_cycle_sync(MeasurementCycleSynchronisation &data) override

Send measurement cycle synchronization.

Parameters:

data – Measurement cycle synchronization

inline virtual bool send_sensor_mode_request(SensorModeRequest &data) override

Send sensor mode request.

Parameters:

data – Sensor mode request

inline virtual bool send_measurement_program(MeasurementProgram &data) override

Send measurement program.

Parameters:

data – Measurement program