Go to the documentation of this file.
9 #include <condition_variable>
77 return "breakpoint_reached";
79 return "breakpoint_unlock";
81 return "hooks_remove_all";
85 return "disable_hooks";
87 return "toggle_recording";
89 return "get_transitions";
108 return sizeof(uint32_t) +
sizeof(uint8_t) +
sizeof(uint8_t);
116 static std::random_device rd;
117 std::mt19937 mt(rd());
118 std::uniform_int_distribution<uint32_t> dist;
128 return !(*
this == other);
148 template <
typename T>
151 memcpy(
buffer + offset, &value,
sizeof(T));
155 template <
typename T>
158 memcpy(
reinterpret_cast<char*
>(&value),
buffer + offset,
sizeof(T));
178 unsigned const offset = 6;
179 buffer.resize(offset + 16);
200 unsigned const offset = 6;
207 using Ptr = std::shared_ptr<Hook>;
250 {
"mode", int(bp.
mode) },
258 js.at(
"enabled").get_to(bp.
enabled);
264 const std::string desired_value = js.at(
"desired_status").get<std::string>();
unsigned Serialize(char *buffer, unsigned offset, T value)
std::shared_ptr< Hook > Ptr
const char * ToString(const RequestType &type)
static pthread_mutex_t mutex
std::string SerializeHeader(const RequestHeader &header)
constexpr uint8_t kProtocolID
buffer(const CharT *, const CharT *) -> buffer< deduce_encoding< CharT >>
std::condition_variable wakeup
NodeStatus desired_status
void from_json(const nlohmann::json &js, Hook &bp)
basic_json<> json
default specialization
unsigned Deserialize(const char *buffer, unsigned offset, T &value)
void to_json(nlohmann::json &js, const Hook &bp)
ReplyHeader DeserializeReplyHeader(const std::string &buffer)
NodeStatus convertFromString< NodeStatus >(StringView str)
RequestHeader DeserializeRequestHeader(const std::string &buffer)
std::string toStr(const T &value)
toStr is the reverse operation of convertFromString.
std::array< char, 16 > TreeUniqueUUID