ark::serial::SerialDeviceStage

Defined in header “ark/serial/stages/serial_device_stage.hh”.


This stage allows you to connect to a serial device, and it will publish “packet groups” to the rest of the system. Packets are considered to be the data returned from a “read” call of to the device.

Methods

  • SerialDeviceStage(std::string name)
    Constructor.

  • ~SerialDeviceStage()
    Destructor. Implemented privately to handle cleanup.

  • void initialize(pipeline::StageInterface & interface)
    Initializes the stage, starting threads and creating publishers.

  • void start()
    Indicates that the system has settled and you should begin any threads or processing.

  • void shutdown()
    Stops the stage, shutting down threads.

  • bool is_opened()
    Returns true if the device is opened; false otherwise. This is intended to be used for testing.

  • std::string get_device_path()
    Returns the path to the device.