46 std::chrono::steady_clock::time_point
at{};
75 const std::string& host, uint16_t
port);
80 Status read(
const std::string& role,
double& psi)
const;
83 static std::string
explain(
const std::string& role,
Status s);
Status
Why a role could not be read.
void start(const fsw::config::Config &cfg, const std::vector< std::string > &roles, const std::string &host, uint16_t port)
Subscribe to exactly the roles given, and nothing else.
std::vector< std::string > subscribedRoles() const
Roles this feed is subscribed to, for diagnostics.
std::atomic< bool > running_
PressureFeed(const PressureFeed &)=delete
Status read(const std::string &role, double &psi) const
std::map< std::pair< uint8_t, uint8_t >, std::string > role_by_table_
Elodin table id -> canonical role name, built once from config.
void runLoop(std::string host, uint16_t port)
static std::string explain(const std::string &role, Status s)
Human phrasing for a refusal, e.g.
std::map< std::string, Reading > readings_
static constexpr int kMaxAgeMs
How old a reading may be and still be acted on.
PressureFeed & operator=(const PressureFeed &)=delete
static const emmc_port_t port
The whole parsed config.toml, restricted to what C++ consumes.
std::chrono::steady_clock::time_point at