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