Class Driver

Inheritance Relationships

Derived Types

Class Documentation

class Driver

Pure abstract base class for drivers.

Subclassed by myactuator_rmd::CanNode< CanAddressOffset::request, CanAddressOffset::response >, myactuator_rmd::CanNode< SEND_ID_OFFSET, RECEIVE_ID_OFFSET >

Public Functions

virtual void addId(std::uint32_t const actuator_id) = 0

Updates the id as well as the send and receive ids in a consistent manner.

Parameters:

actuator_id[in] The id of the actuator

virtual void send(Message const &msg, std::uint32_t const actuator_id) = 0

Writes the given data to the participant with the actuator id actuator_id.

Parameters:
  • msg[in] The message that should be sent to the corresponding actuator

  • actuator_id[in] The ID of the actuator that the message should be sent to

virtual std::array<std::uint8_t, 8> sendRecv(Message const &request, std::uint32_t const actuator_id) = 0

Writes the given data to the actuator with the corresponding id and waits for a corresponding reply.

Parameters:
  • request[in] Request that should be sent to the corresponding actuator

  • actuator_id[in] The ID of the actuator that the message should be sent to

Returns:

The response bytes

Protected Functions

Driver() = default
Driver(Driver const&) = default
Driver &operator=(Driver const&) = default
Driver(Driver&&) = default
Driver &operator=(Driver&&) = default

Protected Attributes

friend ActuatorInterface