Files
gen_data_agent/data_gen_dependencies/aimdk/protocol/common/header.proto
2025-09-05 15:49:00 +08:00

72 lines
1.3 KiB
Protocol Buffer
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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;
}