Last active
April 24, 2017 13:49
-
-
Save nathantsoi/b56a34cd91daf2d60d794ae3031bbbc4 to your computer and use it in GitHub Desktop.
nano pb example
This file contains 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
syntax = "proto2"; | |
import "msg_osd.proto"; | |
message Message { | |
enum Type { | |
Api = 1; | |
Osd = 2; | |
} | |
required uint32 utime = 1; | |
oneof payload { | |
MsgApi msg_api = 2; | |
MsgOsd msg_osd = 3; | |
} | |
} |
This file contains 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
syntax = "proto2"; | |
message MsgOsd { | |
enum VideoSystem { | |
AUTO = 0; | |
PAL = 1; | |
NTSC = 2; | |
} | |
optional VideoSystem video_system = 1; | |
enum UnitType { | |
METRIC = 0; | |
IMPERIAL = 1; | |
} | |
optional UnitType units = 2; | |
message Alarm { | |
optional string name = 1 [default = ""]; | |
optional uint32 limit = 2; | |
} | |
repeated Alarm alarms = 3; | |
message Element { | |
optional string name = 1 [default = ""]; | |
optional uint32 position = 2; | |
} | |
repeated Element elments = 4; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment