4#ifndef ATHREMOTEEXECWIRE_REMOTEEXECWIRE_H
5#define ATHREMOTEEXECWIRE_REMOTEEXECWIRE_H
56 return "UNKNOWN_SEQUENCE";
58 return "INVALID_REQUEST";
66 return "SHUTTING_DOWN";
81 static constexpr size_t maxShown = 16;
82 std::ostringstream out;
83 out << std::format(
"{} [{}, {} bytes]", payload.schema, payload.encoding,
86 if (payload.data.empty()) {
90 const size_t toShow = std::min(payload.data.size(), maxShown);
91 out << std::format(
" payload[0:{}]=0x", toShow - 1) << std::hex
93 std::for_each(payload.data.begin(), payload.data.begin() + toShow,
94 [&out](
const char byte) {
95 out << std::setw(2) << static_cast<unsigned int>(byte);
114 std::vector<std::string> absent;
116 absent.push_back(
"run_number");
119 absent.push_back(
"event_number");
122 absent.push_back(
"lumi_block");
125 absent.push_back(
"time_stamp");
157 if (fields.size() != 3 && !(fields.size() == 2 && spec.back() ==
'#')) {
166 .encoding = fields[1],
167 .schema = fields.size() == 3 ? fields[2] :
""};
static const Attributes_t empty
std::optional< BoundaryInfo > parseBoundary(std::string_view spec)
Parse "key#encoding#schema" into BoundaryInfo.
constexpr std::string_view toString(Status status)
String representation of Status enum.
bool decode(std::string_view wire, ExecuteRequest &request)
std::string describe(const Payload &payload)
Human-readable rendering of a payload, for log messages.
bool encode(const ExecuteRequest &request, std::string &wire)
std::string rpcFrameworkVersion()
Returns string describing RPC framework and its version.
constexpr bool isRefusal(Status status)
Check if server refused to process the request.
std::vector< std::string > tokenize(std::string_view the_str, std::string_view delimiters)
Splits the string into smaller substrings.
Information what kind of data is expected, in which RPC protocol, and the meaning of the data.
std::string schema
what the bytes are, may be empty
std::string encoding
serialisation mechanism; see IPayloadCodec.h
std::string key
StoreGate key.
An unique event identifier.
std::vector< std::string > missing() const
Names of the required fields that are missing.
std::optional< uint32_t > timeStamp
std::optional< uint32_t > lumiBlock
std::optional< uint64_t > eventNumber
uint32_t timeStampNsOffset
std::optional< uint32_t > runNumber
std::vector< Payload > outputs
std::string sequence
fragment name, e.g. "RemoteExecSeqSum"
uint64_t requestId
client correlation id, echoed back
std::vector< Payload > inputs
The actual data that is sent via RPC.
std::string encoding
serialisation mechanism; see IPayloadCodec.h
std::string key
StoreGate key.
std::string schema
what the bytes are, in that mechanism's terms
std::string data
binary data
Information about what sequence the server is capable of executing.
std::vector< BoundaryInfo > inputs
std::vector< BoundaryInfo > outputs