1 syntax = "proto2"; 2 3 // The types of message notification sent from Moblab. 4 enum MessageType { 5 MOBLAB_HEARTBEAT = 1; 6 MOBLAB_REMOTE_EVENT = 2; 7 MOBLAB_ALERT = 3; 8 } 9 10 message Timestamp { 11 required int64 seconds = 1; 12 optional int64 nanos = 2 [default = 0]; 13 } 14 15 // The heartbeat message 16 message Heartbeat { 17 optional Timestamp timestamp = 1; 18 } 19 20 // The remote event notification message. 21 message RemoteEventMessage { 22 // EventType is an enumeration of event types sent to cloud console. 23 // Any new event type should be added here. 24 enum EventType { 25 MOBLAB_INFO = 1; 26 MOBLAB_BOOT_COMPLETE = 2; 27 } 28 29 required EventType event_type = 1 [default = MOBLAB_INFO]; 30 optional string event_data = 2; 31 } 32 33 // Moblab alerts 34 message Alert { 35 enum AlertLevel { 36 CRITICAL = 1; 37 MAJOR = 2; 38 MINOR = 3; 39 } 40 required AlertLevel level = 1; 41 optional string data = 2; 42 optional Timestamp timestamp = 3; 43 optional string source_application = 4; 44 optional string source_component = 5; 45 } 46