Class ParticipantRegistry

Class Documentation

class rmf_traffic_ros2::schedule::ParticipantRegistry

Adds a persistance layer to the participant ids. This allows the scheduler to restart without the need to restart fleet adapters. Internally, this class implements a an append only journal. This makes it independent of any id generation inside the database, as long as the said database id generation algorithm is deterministic.

Public Types

using Registration = rmf_traffic::schedule::Writer::Registration

Public Functions

ParticipantRegistry(std::unique_ptr<AbstractParticipantLogger> logger, std::shared_ptr<Database> database)

Constructor

Parameters
  • [in] logger: The logging implementation to use for recording registration.

  • [in] database: The database that will register the participants.

Registration add_or_retrieve_participant(ParticipantDescription description)

Adds a participant or retrieves its ID if it was already added in the past

Return

ParticipantId of the participant

Parameters
  • [in] description: The description of the participant that one wishes to register.