39 void set_router(std::shared_ptr<Router> router);
100 const std::weak_ptr<Primary> *target,
101 std::weak_ptr<Primary> &out_session,
121 std::unordered_map<stream_id, token_type>
_tokens;
std::unordered_map< stream_id, token_type > _tokens
void set_router(std::shared_ptr< Router > router)
std::optional< token_type > GetToken(stream_id sensor_id, actor_id sensor_actor_id)
Returns std::nullopt if no secondary could provide the token (e.g.
std::size_t RerouteLostSensors()
Routes every sensor whose secondary disconnected to the secondaries connected since the previous call...
void DisableForROS(stream_id sensor_id)
bool SendIsEnabledForROS(stream_id sensor_id)
void SendFrameData(carla::Buffer buffer)
bool SendEnableForROS(stream_id sensor_id)
std::optional< token_type > SendGetToken(stream_id sensor_id, actor_id sensor_actor_id, const std::weak_ptr< Primary > *target, std::weak_ptr< Primary > &out_session, TokenError &error)
bool IsRoutedToLiveSecondary(stream_id sensor_id)
Whether sensor_id is routed to a secondary that is still connected.
bool EnableForROS(stream_id sensor_id, actor_id sensor_actor_id)
Returns false if no secondary accepted this sensor or the secondary holding it did not reply; ROS ena...
std::unordered_map< stream_id, Route > _servers
void SendDisableForROS(stream_id sensor_id)
void ForgetSensor(stream_id sensor_id)
Drops the routing of a destroyed sensor so it is never routed again.
static bool ReadBoolReply(const carla::Buffer &buffer)
Reads a one-bool reply; buffer must not be empty.
void RestoreRosAfterReroute(stream_id sensor_id)
Enables ROS again on the new secondary of a re-routed sensor if it was enabled before.
bool IsEnabledForROS(stream_id sensor_id)
std::shared_ptr< Router > _router
void SendLoadMap(std::string map, const LoadMapExtras &extras={})
Serializes a stream endpoint.
carla::streaming::detail::stream_id_type stream_id
This file contains definitions of common data structures used in traffic manager.
std::weak_ptr< Primary > session