Class SerialFactory

Inheritance Relationships

Derived Type

Class Documentation

class SerialFactory

This factory is used to create and configure a Serial interface implementation that is used by the driver to interact with the hardware. A factory is used to keep the code cleaner but also to simplify testing. With a factory, we can test that the parameters read by the hardware interface are correctly parsed and passed down to the serial interface. A factory can also be mocked to return different implementation of the serial interface (or mocks) that do not require interaction with the real hardware.

Subclassed by robotiq_driver::DefaultSerialFactory

Public Functions

virtual std::unique_ptr<Serial> create(const hardware_interface::HardwareInfo &info) const = 0