Last active
January 1, 2016 23:09
-
-
Save ahappyforest/8214376 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package command; | |
// meta message | |
message meta_config { | |
required string k = 1; | |
required int32 v = 2; | |
} | |
message meta_time { | |
required string timestamp = 1; | |
} | |
message meta_ack { | |
required ack ret = 1; | |
enum ack { | |
SUCCESS = 0; | |
FAIL = 1; | |
} | |
} | |
// service | |
// 1. get_config | |
// Request | |
// 1. "MUSHROOM" | "get_config\n\r" | 0 | 0x13 | |
// Response | |
// 2. "MUSHROOM" | "get_config\n\r" | sz | meta_config | 0x13 | |
// 2. set_config | |
// Request | |
// 1. "MUSHROOM" | "set_config\n\r" | sz | meta_config | 0x13 | |
// Response | |
// 2. "MUSHROOM" | "set_config\n\r" | sz | meta_ack | 0x13 | |
// 3. get_time | |
// Request | |
// 1. "MUSHROOM" | "get_time\n\r" | 0 | 0x13 | |
// Response | |
// 2. "MUSHROOM" | "get_time\n\r" | sz | meta_time | 0x13 | |
// 4. set_time | |
// Request | |
// 1. "MUSHROOM" | "set_time\n\r" | sz | meta_time | 0x13 | |
// Response | |
// 2. "MUSHROOM" | "set_time\n\r" | sz | meta_ack | 0x13 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment