|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
SubscriptionTracker + ElodinClient::subscribe_table: a subscription the DB refuses is asked for again, and only that one. More...
#include <SubscriptionTracker.hpp>
Public Types | |
| using | Table = std::pair<uint8_t, uint8_t> |
| using | Clock = std::chrono::steady_clock |
Public Member Functions | |
| SubscriptionTracker (std::chrono::milliseconds retry_after=std::chrono::seconds(1)) | |
| uint8_t | assign (Table table) |
| The request id to subscribe table under. | |
| Table | rejected (uint8_t request_id, Clock::time_point now) |
| The DB refused the subscription sent under request_id. | |
| std::vector< Table > | due (Clock::time_point now) |
| Refused tables whose wait is over; each is forgotten here until rejected again. | |
| size_t | refused () const |
| Tables currently waiting to be asked for again. | |
| void | reset () |
| A new connection: every subscription is sent afresh. | |
Private Attributes | |
| std::chrono::milliseconds | retry_after_ |
| uint8_t | next_id_ = 1 |
| std::map< uint8_t, Table > | by_id_ |
| std::map< Table, Clock::time_point > | retry_at_ |
SubscriptionTracker + ElodinClient::subscribe_table: a subscription the DB refuses is asked for again, and only that one.
On 2026-11-05 calibration_service subscribed to the ball valve's raw tables a moment before daq_bridge registered them. The DB refused (ErrorResponse, echoing the request id), nothing noticed, and no ball valve position was published for the whole session. Calibration's only recovery was "no packets at all for 5 s", which never fires while other tables stream.
Definition at line 36 of file SubscriptionTracker.hpp.
| using fsw::elodin::SubscriptionTracker::Clock = std::chrono::steady_clock |
Definition at line 39 of file SubscriptionTracker.hpp.
| using fsw::elodin::SubscriptionTracker::Table = std::pair<uint8_t, uint8_t> |
Definition at line 38 of file SubscriptionTracker.hpp.
|
inlineexplicit |
Definition at line 41 of file SubscriptionTracker.hpp.
|
inline |
The request id to subscribe table under.
Ids rotate through 1..254: 0 is what untracked subscriptions use, and 255 is the backend's subscription fence.
Definition at line 49 of file SubscriptionTracker.hpp.
|
inline |
Refused tables whose wait is over; each is forgotten here until rejected again.
Definition at line 71 of file SubscriptionTracker.hpp.
|
inline |
Tables currently waiting to be asked for again.
Definition at line 85 of file SubscriptionTracker.hpp.
|
inline |
The DB refused the subscription sent under request_id.
Returns the table it was for, so the caller can say which; {0, 0} for an id this tracker did not hand out.
Definition at line 60 of file SubscriptionTracker.hpp.
|
inline |
A new connection: every subscription is sent afresh.
Definition at line 90 of file SubscriptionTracker.hpp.
|
private |
Definition at line 98 of file SubscriptionTracker.hpp.
|
private |
Definition at line 97 of file SubscriptionTracker.hpp.
|
private |
Definition at line 96 of file SubscriptionTracker.hpp.
|
private |
Definition at line 99 of file SubscriptionTracker.hpp.