40 std::string error_code =
"internal_error",
41 std::string error_data_json =
"{}");
47#define PULP_INSPECT_METHOD(symbol, wire_name, capability, kind) \
48 inline constexpr auto symbol = wire_name;
50#undef PULP_INSPECT_METHOD
Definition protocol.hpp:46
Definition agent_context.hpp:7
std::string encode_message(const InspectorMessage &msg)
Serialize a message to a JSON string.
InspectorMessage make_error(int64_t id, std::string error_message, std::string error_code="internal_error", std::string error_data_json="{}")
bool decode_message(const std::string &json, InspectorMessage &out)
Parse a JSON string into a message. Returns false on parse failure.
InspectorMessage make_request(int64_t id, std::string method, std::string params_json="{}")
constexpr std::size_t kInspectorExtendedMessageBytes
Bounded transfer ceiling used by clients and by hosts that expose image capture.
Definition protocol.hpp:14
InspectorMessage make_response(int64_t id, std::string result_json)
InspectorMessage make_event(std::string method, std::string params_json="{}")
A single inspector protocol message (request, response, or event).
Definition protocol.hpp:18
bool is_error
True if this is an error response.
Definition protocol.hpp:22
std::string error_code
Stable machine-readable code for error responses.
Definition protocol.hpp:23
std::string params_json
JSON object string (params for request, result for response).
Definition protocol.hpp:21
std::string method
"Domain.method" — e.g. "DOM.getDocument"
Definition protocol.hpp:20
std::string error_data_json
Optional structured error details.
Definition protocol.hpp:24