Skip to content

Commit

Permalink
DPL: add API to stop / start devices
Browse files Browse the repository at this point in the history
  • Loading branch information
ktf committed Aug 16, 2023
1 parent 2de585a commit ef5943d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Framework/Core/src/WSDriverClient.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,16 @@ void on_connect(uv_connect_t* connection, int status)
state.nextFairMQState.emplace_back("STOP");
});

client->observe("/start", [ref = context->ref](std::string_view) {
auto& state = ref.get<DeviceState>();
state.nextFairMQState.emplace_back("RUN");
});

client->observe("/stop", [ref = context->ref](std::string_view) {
auto& state = ref.get<DeviceState>();
state.nextFairMQState.emplace_back("RUN");
});

client->observe("/trace", [ref = context->ref](std::string_view cmd) {
auto& state = ref.get<DeviceState>();
static constexpr int prefixSize = std::string_view{"/trace "}.size();
Expand Down

0 comments on commit ef5943d

Please sign in to comment.