23 const int trajectory_id,
24 const std::unordered_set<string>& expected_sensor_ids,
26 for (
const auto& sensor_id : expected_sensor_ids) {
27 const auto queue_key =
QueueKey{trajectory_id, sensor_id};
29 [callback, sensor_id](std::unique_ptr<Data> data) {
30 callback(sensor_id, std::move(data));
37 for (
const auto& queue_key :
queue_keys_[trajectory_id]) {
43 std::unique_ptr<Data> data) {
std::function< void(const string &, std::unique_ptr< Data >)> Callback
std::unordered_map< int, std::vector< QueueKey > > queue_keys_
void AddTrajectory(int trajectory_id, const std::unordered_set< string > &expected_sensor_ids, Callback callback)
QueueKey GetBlocker() const
void AddQueue(const QueueKey &queue_key, Callback callback)
void AddSensorData(int trajectory_id, const string &sensor_id, std::unique_ptr< Data > data)
void MarkQueueAsFinished(const QueueKey &queue_key)
void Add(const QueueKey &queue_key, std::unique_ptr< Data > data)
void FinishTrajectory(int trajectory_id)
int GetBlockingTrajectoryId() const