William Kurkian | 6ea97f8 | 2019-03-13 15:51:55 -0400 | [diff] [blame] | 1 | syntax = "proto3"; |
| 2 | |
| 3 | option go_package = "github.com/opencord/voltha-protos/go/voltha"; |
| 4 | |
| 5 | package voltha; |
| 6 | |
| 7 | import "google/protobuf/empty.proto"; |
| 8 | import "voltha_protos/openflow_13.proto"; |
| 9 | |
| 10 | |
| 11 | message PonSimOnuDeviceInfo { |
| 12 | int32 uni_port = 1; |
| 13 | string serial_number = 2; |
| 14 | } |
| 15 | |
| 16 | message PonSimDeviceInfo { |
| 17 | int32 nni_port = 1; |
| 18 | repeated PonSimOnuDeviceInfo onus = 2; |
| 19 | } |
| 20 | |
| 21 | message FlowTable { |
| 22 | int32 port = 1; // Used to address right device |
| 23 | repeated openflow_13.ofp_flow_stats flows = 2; |
| 24 | } |
| 25 | |
| 26 | message PonSimFrame { |
| 27 | string id = 1; |
| 28 | bytes payload = 2; |
| 29 | int32 out_port = 3; |
| 30 | } |
| 31 | |
| 32 | message PonSimPacketCounter { |
| 33 | string name = 1; |
| 34 | int64 value = 2; |
| 35 | } |
| 36 | |
| 37 | message PonSimPortMetrics { |
| 38 | string port_name = 1; |
| 39 | repeated PonSimPacketCounter packets = 2; |
| 40 | } |
| 41 | |
| 42 | message PonSimMetrics { |
| 43 | string device = 1; |
| 44 | repeated PonSimPortMetrics metrics = 2; |
| 45 | } |
| 46 | |
| 47 | message PonSimMetricsRequest { |
| 48 | int32 port = 1; |
| 49 | } |
| 50 | |
| 51 | service PonSim { |
| 52 | rpc SendFrame(PonSimFrame) |
| 53 | returns (google.protobuf.Empty) {} |
| 54 | |
| 55 | rpc ReceiveFrames(google.protobuf.Empty) |
| 56 | returns (stream PonSimFrame) {} |
| 57 | |
| 58 | rpc GetDeviceInfo(google.protobuf.Empty) |
| 59 | returns(PonSimDeviceInfo) {} |
| 60 | |
| 61 | rpc UpdateFlowTable(FlowTable) |
| 62 | returns(google.protobuf.Empty) {} |
| 63 | |
| 64 | rpc GetStats(google.protobuf.Empty) |
| 65 | returns(PonSimMetrics) {} |
| 66 | |
| 67 | } |