Dinesh Belwalkar | 4122960 | 2019-06-21 16:58:06 +0000 | [diff] [blame] | 1 | syntax = "proto3"; |
| 2 | |
| 3 | |
| 4 | package importer; |
| 5 | |
| 6 | import "google/protobuf/empty.proto"; |
| 7 | //import "google/api/annotations.proto"; |
| 8 | |
| 9 | |
| 10 | message DeviceInfo { |
Dinesh Belwalkar | a0493ad | 2019-07-22 19:58:42 +0000 | [diff] [blame] | 11 | string ip_address = 1; |
| 12 | uint32 frequency = 2; |
| 13 | string vendor = 3; |
Dinesh Belwalkar | e1e85ad | 2019-07-31 23:06:47 +0000 | [diff] [blame] | 14 | string protocol = 4; |
Dinesh Belwalkar | 4122960 | 2019-06-21 16:58:06 +0000 | [diff] [blame] | 15 | } |
| 16 | |
Dinesh Belwalkar | b5db83f | 2019-10-24 17:27:58 +0000 | [diff] [blame] | 17 | message GivenEventList { |
Dinesh Belwalkar | a0493ad | 2019-07-22 19:58:42 +0000 | [diff] [blame] | 18 | string event_ip_address = 1; |
Dinesh Belwalkar | f57ee2e | 2019-07-11 17:46:00 +0000 | [diff] [blame] | 19 | repeated string events = 2; |
| 20 | } |
| 21 | |
Dinesh Belwalkar | b5db83f | 2019-10-24 17:27:58 +0000 | [diff] [blame] | 22 | message EventList { |
Dinesh Belwalkar | a0493ad | 2019-07-22 19:58:42 +0000 | [diff] [blame] | 23 | repeated string events = 1; |
| 24 | } |
Dinesh Belwalkar | 4122960 | 2019-06-21 16:58:06 +0000 | [diff] [blame] | 25 | |
Dinesh Belwalkar | b5db83f | 2019-10-24 17:27:58 +0000 | [diff] [blame] | 26 | message FreqInfo { |
| 27 | string IpAddress = 1; |
| 28 | uint32 Frequency = 2; |
| 29 | } |
| 30 | |
| 31 | message VendorInfo { |
| 32 | string Vendor = 1; |
| 33 | } |
| 34 | |
| 35 | message Device { |
| 36 | string IpAddress = 1; |
| 37 | } |
| 38 | |
dileepbk | 86ef010 | 2019-11-13 00:08:33 +0000 | [diff] [blame] | 39 | message DeviceList { |
| 40 | repeated string ip = 1; |
| 41 | } |
Dinesh Belwalkar | b5db83f | 2019-10-24 17:27:58 +0000 | [diff] [blame] | 42 | |
| 43 | message Empty {} |
dileepbk | 86ef010 | 2019-11-13 00:08:33 +0000 | [diff] [blame] | 44 | |
Dinesh Belwalkar | 4122960 | 2019-06-21 16:58:06 +0000 | [diff] [blame] | 45 | service device_management { |
Dinesh Belwalkar | f57ee2e | 2019-07-11 17:46:00 +0000 | [diff] [blame] | 46 | rpc SendDeviceInfo(DeviceInfo) returns (google.protobuf.Empty) {} |
| 47 | |
Dinesh Belwalkar | b5db83f | 2019-10-24 17:27:58 +0000 | [diff] [blame] | 48 | rpc SetFrequency(FreqInfo) returns (google.protobuf.Empty) {} |
Dinesh Belwalkar | f57ee2e | 2019-07-11 17:46:00 +0000 | [diff] [blame] | 49 | |
Dinesh Belwalkar | b5db83f | 2019-10-24 17:27:58 +0000 | [diff] [blame] | 50 | rpc GetEventList(VendorInfo) returns (EventList) {} |
Dinesh Belwalkar | f57ee2e | 2019-07-11 17:46:00 +0000 | [diff] [blame] | 51 | |
Dinesh Belwalkar | b5db83f | 2019-10-24 17:27:58 +0000 | [diff] [blame] | 52 | rpc SubsrcribeGivenEvents(GivenEventList) returns (google.protobuf.Empty) {} |
Dinesh Belwalkar | f57ee2e | 2019-07-11 17:46:00 +0000 | [diff] [blame] | 53 | |
Dinesh Belwalkar | b5db83f | 2019-10-24 17:27:58 +0000 | [diff] [blame] | 54 | rpc UnSubsrcribeGivenEvents(GivenEventList) returns (google.protobuf.Empty) {} |
| 55 | |
| 56 | rpc GetCurrentEventList(Device) returns (EventList) {} |
| 57 | |
| 58 | rpc ClearCurrentEventList(Device) returns (google.protobuf.Empty) {} |
| 59 | |
dileepbk | 86ef010 | 2019-11-13 00:08:33 +0000 | [diff] [blame] | 60 | rpc GetCurrentDevices(Empty) returns (DeviceList) {} |
Dinesh Belwalkar | 4122960 | 2019-06-21 16:58:06 +0000 | [diff] [blame] | 61 | } |
| 62 | |
| 63 | |
Dinesh Belwalkar | f57ee2e | 2019-07-11 17:46:00 +0000 | [diff] [blame] | 64 | |