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