24 bool hasNewMetric =
false;
25 std::array<Metric2DViewIndex*, 2> model = {&(*
mContext.
infos)[
mIndex].inputChannelMetricsViewIndex,
29 auto newMetricCallback = [&](std::string
const&
name,
MetricInfo const& metric,
int value,
size_t metricIndex) {
30 updateMetricsViews(model,
name, metric,
value, metricIndex);
33 std::string_view tokenSV(
frame, s);
43 LOG(debug3) <<
"Data received: " << std::string_view(
frame, s);
55 std::string_view
const token(
frame, s);
56 std::match_results<std::string_view::const_iterator>
match;
61 LOG(debug2) <<
"Found configuration information for pid " <<
mPid;
63 LOG(error) <<
"Unexpected control data: " << std::string_view(
frame, s);
87 std::fill(metricsInfo.changed.begin(), metricsInfo.changed.end(),
false);
93 if (
headers.count(
"x-dpl-pid")) {
94 auto s =
headers.find(
"x-dpl-pid");
95 this->
mPid = std::stoi(s->second);
bool match(const std::vector< std::string > &queries, const char *pattern)
GLuint const GLchar * name
GLsizei const GLfloat * value
Defining PrimaryVertex explicitly as messageable.
static bool parseControl(std::string_view const &s, std::match_results< std::string_view::const_iterator > &match)
static void processCommand(std::vector< DeviceInfo > &infos, std::vector< DataProcessingStates > &allStates, pid_t pid, std::string const &command, std::string const &arg)
size_t mIndex
The index of the remote process associated to this handler.
void headers(std::map< std::string, std::string > const &headers) override
ControlWebSocketHandler(DriverServerContext &context)
DriverServerContext & mContext
void frame(char const *frame, size_t s) override
static bool processConfig(ParsedConfigMatch &results, DeviceInfo &info)
static bool parseConfig(std::string_view const s, ParsedConfigMatch &results)
static bool parseMetric(std::string_view const s, ParsedMetricMatch &results)
Helper function to parse a metric string.
static bool processMetric(ParsedMetricMatch &results, DeviceMetricsInfo &info, NewMetricCallback newMetricCallback=nullptr)
std::vector< ServiceMetricHandling > * metricProcessingCallbacks
std::vector< DeviceSpec > * specs
std::vector< DeviceMetricsInfo > * metrics
std::vector< DataProcessingStates > * states
std::vector< DeviceInfo > * infos
ServiceRegistryRef registry
static Updater getUpdater()
Get the right updated function given a list of Metric views.
Temporary struct to hold a configuration parameter.
Temporary struct to hold a metric after it has been parsed.
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"