syntax = "proto3"; package aimdk.protocol; import "aimdk/protocol/common/timestamp.proto"; /** * @brief 一般消息的 header */ message Header { // sequence ID: consecutively increasing ID uint32 seq = 1; // timestamp Timestamp timestamp = 2; // Frame this data is associated with string frame_id = 3; } /** * @brief RPC 请求体的 header */ message RequestHeader { // timestamp Timestamp timestamp = 1; } /** * @brief RPC 响应体的 header */ message ResponseHeader { // 处理结果 // - 为0: 成功 // - 非0: 失败 uint64 code = 1; // 处理结果描述 string msg = 2; // 时间戳 Timestamp timestamp = 3; } /** * @brief 可阻塞的 RPC 请求体的 header */ message BlockableRequestHeader { // 时间戳 Timestamp timestamp = 1; // 是否阻塞调用(默认 false) bool blocked = 2; } message BlockableResponseHeader { // 处理结果 // - 为0: 成功 // - 非0: 失败 uint64 code = 1; // 处理结果描述 string msg = 2; // 时间戳 Timestamp timestamp = 3; // 请求关联的 rpc id,若设置了非阻塞模式,该字段可用于调用者向执行者定期查询 rpc 执行情况, // 该值需由执行者维护并设置,默认为零无效。 uint64 id = 4; }