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; |
Dinesh Belwalkar | 4122960 | 2019-06-21 16:58:06 +0000 | [diff] [blame] | 13 | } |
| 14 | |
Dinesh Belwalkar | b5db83f | 2019-10-24 17:27:58 +0000 | [diff] [blame] | 15 | message GivenEventList { |
Dinesh Belwalkar | a0493ad | 2019-07-22 19:58:42 +0000 | [diff] [blame] | 16 | string event_ip_address = 1; |
Dinesh Belwalkar | f57ee2e | 2019-07-11 17:46:00 +0000 | [diff] [blame] | 17 | repeated string events = 2; |
| 18 | } |
| 19 | |
Dinesh Belwalkar | b5db83f | 2019-10-24 17:27:58 +0000 | [diff] [blame] | 20 | message EventList { |
Dinesh Belwalkar | a0493ad | 2019-07-22 19:58:42 +0000 | [diff] [blame] | 21 | repeated string events = 1; |
| 22 | } |
Dinesh Belwalkar | 4122960 | 2019-06-21 16:58:06 +0000 | [diff] [blame] | 23 | |
Dinesh Belwalkar | b5db83f | 2019-10-24 17:27:58 +0000 | [diff] [blame] | 24 | message FreqInfo { |
| 25 | string IpAddress = 1; |
| 26 | uint32 Frequency = 2; |
| 27 | } |
| 28 | |
Dinesh Belwalkar | b5db83f | 2019-10-24 17:27:58 +0000 | [diff] [blame] | 29 | message Device { |
| 30 | string IpAddress = 1; |
| 31 | } |
| 32 | |
Dinesh Belwalkar | b5db83f | 2019-10-24 17:27:58 +0000 | [diff] [blame] | 33 | message Empty {} |
dileepbk | 86ef010 | 2019-11-13 00:08:33 +0000 | [diff] [blame] | 34 | |
mc | 20a4b5f | 2019-10-16 20:28:24 +0000 | [diff] [blame] | 35 | message DeviceList { |
| 36 | repeated DeviceInfo device = 1; |
| 37 | } |
| 38 | |
| 39 | message DeviceListByIp { |
| 40 | repeated string Ip = 1; |
| 41 | } |
| 42 | |
Dinesh Belwalkar | 4122960 | 2019-06-21 16:58:06 +0000 | [diff] [blame] | 43 | service device_management { |
mc | 20a4b5f | 2019-10-16 20:28:24 +0000 | [diff] [blame] | 44 | rpc SendDeviceList(DeviceList) returns (google.protobuf.Empty) {} |
| 45 | |
| 46 | rpc DeleteDeviceList(DeviceListByIp) returns (google.protobuf.Empty) {} |
Dinesh Belwalkar | f57ee2e | 2019-07-11 17:46:00 +0000 | [diff] [blame] | 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 | |
mc | 20a4b5f | 2019-10-16 20:28:24 +0000 | [diff] [blame] | 50 | rpc GetEventList(Device) returns (EventList) {} |
Dinesh Belwalkar | f57ee2e | 2019-07-11 17:46:00 +0000 | [diff] [blame] | 51 | |
mc | cd7e950 | 2019-12-16 22:04:13 +0000 | [diff] [blame^] | 52 | rpc SubscribeGivenEvents(GivenEventList) returns (google.protobuf.Empty) {} |
Dinesh Belwalkar | f57ee2e | 2019-07-11 17:46:00 +0000 | [diff] [blame] | 53 | |
mc | cd7e950 | 2019-12-16 22:04:13 +0000 | [diff] [blame^] | 54 | rpc UnsubscribeGivenEvents(GivenEventList) returns (google.protobuf.Empty) {} |
Dinesh Belwalkar | b5db83f | 2019-10-24 17:27:58 +0000 | [diff] [blame] | 55 | |
| 56 | rpc GetCurrentEventList(Device) returns (EventList) {} |
| 57 | |
| 58 | rpc ClearCurrentEventList(Device) returns (google.protobuf.Empty) {} |
| 59 | |
mc | 20a4b5f | 2019-10-16 20:28:24 +0000 | [diff] [blame] | 60 | rpc GetCurrentDevices(Empty) returns (DeviceListByIp) {} |
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 | |