11#ifndef O2_FRAMEWORK_STATUSWEBSOCKETHANDLER_H_
12#define O2_FRAMEWORK_STATUSWEBSOCKETHANDLER_H_
17#include <unordered_set>
23struct DriverServerContext;
61 void headers(std::map<std::string, std::string>
const&
headers)
override;
63 void frame(
char const*
data,
size_t s)
override;
81 void sendText(std::string
const&
json);
82 void handleListMetrics(std::string_view deviceName);
83 void handleSubscribe(std::string_view deviceName, std::string_view metricsJson);
84 void handleUnsubscribe(std::string_view deviceName, std::string_view metricsJson);
85 void handleSubscribeLogs(std::string_view deviceName);
86 void handleUnsubscribeLogs(std::string_view deviceName);
87 size_t findDeviceIndex(std::string_view
name)
const;
93 std::vector<std::unordered_set<std::string>> mSubscribedMetrics;
95 std::vector<size_t> mLastLogSeq;
97 std::unordered_set<size_t> mLogSubscriptions;
GLuint const GLchar * name
Defining PrimaryVertex explicitly as messageable.
void beginFragmentation() override
FIXME: not implemented.
void control(char const *frame, size_t s) override
FIXME: not implemented.
void sendSnapshot()
Send a minimal JSON snapshot (device list + basic state, no metrics/logs).
void sendNewLogs(size_t deviceIndex)
void sendUpdate(size_t deviceIndex)
~StatusWebSocketHandler() override
void frame(char const *data, size_t s) override
Handles incoming commands from the MCP client.
void endChunk() override
Invoked whenever we have no more input to process.
void endFragmentation() override
FIXME: not implemented.
void beginChunk() override
Invoked before processing the next round of input.
void headers(std::map< std::string, std::string > const &headers) override
Sends the minimal snapshot on handshake completion.
An handler for a websocket message stream.