| | |
| | | |
| | | package bhome.msg; |
| | | |
| | | // message format : header(BHMsgHead) + body(variable types) |
| | | message BHAddress { |
| | | bytes mq_id = 1; // mqid, uuid |
| | | bytes ip = 2; // |
| | | int32 port = 3; |
| | | } |
| | | |
| | | message BHMsg { |
| | | message ProcInfo |
| | | { |
| | | bytes id = 1; |
| | | bytes name = 2; |
| | | bytes public_info = 3; |
| | | bytes private_info = 4; |
| | | } |
| | | |
| | | message BHMsgHead { |
| | | bytes msg_id = 1; |
| | | repeated BHAddress route = 2; // for reply and proxy. |
| | | int64 timestamp = 3; |
| | | int32 type = 4; |
| | | ProcInfo proc = 5; |
| | | bytes topic = 6; // for request route |
| | | } |
| | | |
| | | message BHMsg { // deprecated |
| | | bytes msg_id = 1; |
| | | int64 timestamp = 2; |
| | | int32 type = 3; |
| | |
| | | bytes data = 1; |
| | | } |
| | | |
| | | message ProcInfo |
| | | { |
| | | bytes name = 1; |
| | | bytes info = 2; |
| | | } |
| | | |
| | | message DataProcRegister |
| | | { |
| | | ProcInfo proc = 1; |
| | |
| | | message DataProcQueryTopicReply { |
| | | BHAddress address = 1; |
| | | } |
| | | |
| | | service TopicRequestReplyService { |
| | | rpc Request (DataRequest) returns (DataReply); |
| | | } |