William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 1 | // Code generated by protoc-gen-go. DO NOT EDIT. |
| 2 | // source: voltha_protos/ponsim.proto |
| 3 | |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 4 | package voltha |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 5 | |
| 6 | import ( |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 7 | context "context" |
| 8 | fmt "fmt" |
| 9 | proto "github.com/golang/protobuf/proto" |
| 10 | empty "github.com/golang/protobuf/ptypes/empty" |
| 11 | openflow_13 "github.com/opencord/voltha-protos/go/openflow_13" |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 12 | grpc "google.golang.org/grpc" |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 13 | math "math" |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 14 | ) |
| 15 | |
| 16 | // Reference imports to suppress errors if they are not otherwise used. |
| 17 | var _ = proto.Marshal |
| 18 | var _ = fmt.Errorf |
| 19 | var _ = math.Inf |
| 20 | |
| 21 | // This is a compile-time assertion to ensure that this generated file |
| 22 | // is compatible with the proto package it is being compiled against. |
| 23 | // A compilation error at this line likely means your copy of the |
| 24 | // proto package needs to be updated. |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 25 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 26 | |
| 27 | type PonSimOnuDeviceInfo struct { |
| 28 | UniPort int32 `protobuf:"varint,1,opt,name=uni_port,json=uniPort,proto3" json:"uni_port,omitempty"` |
| 29 | SerialNumber string `protobuf:"bytes,2,opt,name=serial_number,json=serialNumber,proto3" json:"serial_number,omitempty"` |
| 30 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 31 | XXX_unrecognized []byte `json:"-"` |
| 32 | XXX_sizecache int32 `json:"-"` |
| 33 | } |
| 34 | |
| 35 | func (m *PonSimOnuDeviceInfo) Reset() { *m = PonSimOnuDeviceInfo{} } |
| 36 | func (m *PonSimOnuDeviceInfo) String() string { return proto.CompactTextString(m) } |
| 37 | func (*PonSimOnuDeviceInfo) ProtoMessage() {} |
| 38 | func (*PonSimOnuDeviceInfo) Descriptor() ([]byte, []int) { |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 39 | return fileDescriptor_352253851b8ea7c0, []int{0} |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 40 | } |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 41 | |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 42 | func (m *PonSimOnuDeviceInfo) XXX_Unmarshal(b []byte) error { |
| 43 | return xxx_messageInfo_PonSimOnuDeviceInfo.Unmarshal(m, b) |
| 44 | } |
| 45 | func (m *PonSimOnuDeviceInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 46 | return xxx_messageInfo_PonSimOnuDeviceInfo.Marshal(b, m, deterministic) |
| 47 | } |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 48 | func (m *PonSimOnuDeviceInfo) XXX_Merge(src proto.Message) { |
| 49 | xxx_messageInfo_PonSimOnuDeviceInfo.Merge(m, src) |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 50 | } |
| 51 | func (m *PonSimOnuDeviceInfo) XXX_Size() int { |
| 52 | return xxx_messageInfo_PonSimOnuDeviceInfo.Size(m) |
| 53 | } |
| 54 | func (m *PonSimOnuDeviceInfo) XXX_DiscardUnknown() { |
| 55 | xxx_messageInfo_PonSimOnuDeviceInfo.DiscardUnknown(m) |
| 56 | } |
| 57 | |
| 58 | var xxx_messageInfo_PonSimOnuDeviceInfo proto.InternalMessageInfo |
| 59 | |
| 60 | func (m *PonSimOnuDeviceInfo) GetUniPort() int32 { |
| 61 | if m != nil { |
| 62 | return m.UniPort |
| 63 | } |
| 64 | return 0 |
| 65 | } |
| 66 | |
| 67 | func (m *PonSimOnuDeviceInfo) GetSerialNumber() string { |
| 68 | if m != nil { |
| 69 | return m.SerialNumber |
| 70 | } |
| 71 | return "" |
| 72 | } |
| 73 | |
| 74 | type PonSimDeviceInfo struct { |
| 75 | NniPort int32 `protobuf:"varint,1,opt,name=nni_port,json=nniPort,proto3" json:"nni_port,omitempty"` |
| 76 | Onus []*PonSimOnuDeviceInfo `protobuf:"bytes,2,rep,name=onus,proto3" json:"onus,omitempty"` |
| 77 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 78 | XXX_unrecognized []byte `json:"-"` |
| 79 | XXX_sizecache int32 `json:"-"` |
| 80 | } |
| 81 | |
| 82 | func (m *PonSimDeviceInfo) Reset() { *m = PonSimDeviceInfo{} } |
| 83 | func (m *PonSimDeviceInfo) String() string { return proto.CompactTextString(m) } |
| 84 | func (*PonSimDeviceInfo) ProtoMessage() {} |
| 85 | func (*PonSimDeviceInfo) Descriptor() ([]byte, []int) { |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 86 | return fileDescriptor_352253851b8ea7c0, []int{1} |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 87 | } |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 88 | |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 89 | func (m *PonSimDeviceInfo) XXX_Unmarshal(b []byte) error { |
| 90 | return xxx_messageInfo_PonSimDeviceInfo.Unmarshal(m, b) |
| 91 | } |
| 92 | func (m *PonSimDeviceInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 93 | return xxx_messageInfo_PonSimDeviceInfo.Marshal(b, m, deterministic) |
| 94 | } |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 95 | func (m *PonSimDeviceInfo) XXX_Merge(src proto.Message) { |
| 96 | xxx_messageInfo_PonSimDeviceInfo.Merge(m, src) |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 97 | } |
| 98 | func (m *PonSimDeviceInfo) XXX_Size() int { |
| 99 | return xxx_messageInfo_PonSimDeviceInfo.Size(m) |
| 100 | } |
| 101 | func (m *PonSimDeviceInfo) XXX_DiscardUnknown() { |
| 102 | xxx_messageInfo_PonSimDeviceInfo.DiscardUnknown(m) |
| 103 | } |
| 104 | |
| 105 | var xxx_messageInfo_PonSimDeviceInfo proto.InternalMessageInfo |
| 106 | |
| 107 | func (m *PonSimDeviceInfo) GetNniPort() int32 { |
| 108 | if m != nil { |
| 109 | return m.NniPort |
| 110 | } |
| 111 | return 0 |
| 112 | } |
| 113 | |
| 114 | func (m *PonSimDeviceInfo) GetOnus() []*PonSimOnuDeviceInfo { |
| 115 | if m != nil { |
| 116 | return m.Onus |
| 117 | } |
| 118 | return nil |
| 119 | } |
| 120 | |
| 121 | type FlowTable struct { |
| 122 | Port int32 `protobuf:"varint,1,opt,name=port,proto3" json:"port,omitempty"` |
| 123 | Flows []*openflow_13.OfpFlowStats `protobuf:"bytes,2,rep,name=flows,proto3" json:"flows,omitempty"` |
| 124 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 125 | XXX_unrecognized []byte `json:"-"` |
| 126 | XXX_sizecache int32 `json:"-"` |
| 127 | } |
| 128 | |
| 129 | func (m *FlowTable) Reset() { *m = FlowTable{} } |
| 130 | func (m *FlowTable) String() string { return proto.CompactTextString(m) } |
| 131 | func (*FlowTable) ProtoMessage() {} |
| 132 | func (*FlowTable) Descriptor() ([]byte, []int) { |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 133 | return fileDescriptor_352253851b8ea7c0, []int{2} |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 134 | } |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 135 | |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 136 | func (m *FlowTable) XXX_Unmarshal(b []byte) error { |
| 137 | return xxx_messageInfo_FlowTable.Unmarshal(m, b) |
| 138 | } |
| 139 | func (m *FlowTable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 140 | return xxx_messageInfo_FlowTable.Marshal(b, m, deterministic) |
| 141 | } |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 142 | func (m *FlowTable) XXX_Merge(src proto.Message) { |
| 143 | xxx_messageInfo_FlowTable.Merge(m, src) |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 144 | } |
| 145 | func (m *FlowTable) XXX_Size() int { |
| 146 | return xxx_messageInfo_FlowTable.Size(m) |
| 147 | } |
| 148 | func (m *FlowTable) XXX_DiscardUnknown() { |
| 149 | xxx_messageInfo_FlowTable.DiscardUnknown(m) |
| 150 | } |
| 151 | |
| 152 | var xxx_messageInfo_FlowTable proto.InternalMessageInfo |
| 153 | |
| 154 | func (m *FlowTable) GetPort() int32 { |
| 155 | if m != nil { |
| 156 | return m.Port |
| 157 | } |
| 158 | return 0 |
| 159 | } |
| 160 | |
| 161 | func (m *FlowTable) GetFlows() []*openflow_13.OfpFlowStats { |
| 162 | if m != nil { |
| 163 | return m.Flows |
| 164 | } |
| 165 | return nil |
| 166 | } |
| 167 | |
| 168 | type PonSimFrame struct { |
| 169 | Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` |
| 170 | Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` |
| 171 | OutPort int32 `protobuf:"varint,3,opt,name=out_port,json=outPort,proto3" json:"out_port,omitempty"` |
| 172 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 173 | XXX_unrecognized []byte `json:"-"` |
| 174 | XXX_sizecache int32 `json:"-"` |
| 175 | } |
| 176 | |
| 177 | func (m *PonSimFrame) Reset() { *m = PonSimFrame{} } |
| 178 | func (m *PonSimFrame) String() string { return proto.CompactTextString(m) } |
| 179 | func (*PonSimFrame) ProtoMessage() {} |
| 180 | func (*PonSimFrame) Descriptor() ([]byte, []int) { |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 181 | return fileDescriptor_352253851b8ea7c0, []int{3} |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 182 | } |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 183 | |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 184 | func (m *PonSimFrame) XXX_Unmarshal(b []byte) error { |
| 185 | return xxx_messageInfo_PonSimFrame.Unmarshal(m, b) |
| 186 | } |
| 187 | func (m *PonSimFrame) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 188 | return xxx_messageInfo_PonSimFrame.Marshal(b, m, deterministic) |
| 189 | } |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 190 | func (m *PonSimFrame) XXX_Merge(src proto.Message) { |
| 191 | xxx_messageInfo_PonSimFrame.Merge(m, src) |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 192 | } |
| 193 | func (m *PonSimFrame) XXX_Size() int { |
| 194 | return xxx_messageInfo_PonSimFrame.Size(m) |
| 195 | } |
| 196 | func (m *PonSimFrame) XXX_DiscardUnknown() { |
| 197 | xxx_messageInfo_PonSimFrame.DiscardUnknown(m) |
| 198 | } |
| 199 | |
| 200 | var xxx_messageInfo_PonSimFrame proto.InternalMessageInfo |
| 201 | |
| 202 | func (m *PonSimFrame) GetId() string { |
| 203 | if m != nil { |
| 204 | return m.Id |
| 205 | } |
| 206 | return "" |
| 207 | } |
| 208 | |
| 209 | func (m *PonSimFrame) GetPayload() []byte { |
| 210 | if m != nil { |
| 211 | return m.Payload |
| 212 | } |
| 213 | return nil |
| 214 | } |
| 215 | |
| 216 | func (m *PonSimFrame) GetOutPort() int32 { |
| 217 | if m != nil { |
| 218 | return m.OutPort |
| 219 | } |
| 220 | return 0 |
| 221 | } |
| 222 | |
| 223 | type PonSimPacketCounter struct { |
| 224 | Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` |
| 225 | Value int64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` |
| 226 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 227 | XXX_unrecognized []byte `json:"-"` |
| 228 | XXX_sizecache int32 `json:"-"` |
| 229 | } |
| 230 | |
| 231 | func (m *PonSimPacketCounter) Reset() { *m = PonSimPacketCounter{} } |
| 232 | func (m *PonSimPacketCounter) String() string { return proto.CompactTextString(m) } |
| 233 | func (*PonSimPacketCounter) ProtoMessage() {} |
| 234 | func (*PonSimPacketCounter) Descriptor() ([]byte, []int) { |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 235 | return fileDescriptor_352253851b8ea7c0, []int{4} |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 236 | } |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 237 | |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 238 | func (m *PonSimPacketCounter) XXX_Unmarshal(b []byte) error { |
| 239 | return xxx_messageInfo_PonSimPacketCounter.Unmarshal(m, b) |
| 240 | } |
| 241 | func (m *PonSimPacketCounter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 242 | return xxx_messageInfo_PonSimPacketCounter.Marshal(b, m, deterministic) |
| 243 | } |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 244 | func (m *PonSimPacketCounter) XXX_Merge(src proto.Message) { |
| 245 | xxx_messageInfo_PonSimPacketCounter.Merge(m, src) |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 246 | } |
| 247 | func (m *PonSimPacketCounter) XXX_Size() int { |
| 248 | return xxx_messageInfo_PonSimPacketCounter.Size(m) |
| 249 | } |
| 250 | func (m *PonSimPacketCounter) XXX_DiscardUnknown() { |
| 251 | xxx_messageInfo_PonSimPacketCounter.DiscardUnknown(m) |
| 252 | } |
| 253 | |
| 254 | var xxx_messageInfo_PonSimPacketCounter proto.InternalMessageInfo |
| 255 | |
| 256 | func (m *PonSimPacketCounter) GetName() string { |
| 257 | if m != nil { |
| 258 | return m.Name |
| 259 | } |
| 260 | return "" |
| 261 | } |
| 262 | |
| 263 | func (m *PonSimPacketCounter) GetValue() int64 { |
| 264 | if m != nil { |
| 265 | return m.Value |
| 266 | } |
| 267 | return 0 |
| 268 | } |
| 269 | |
| 270 | type PonSimPortMetrics struct { |
| 271 | PortName string `protobuf:"bytes,1,opt,name=port_name,json=portName,proto3" json:"port_name,omitempty"` |
| 272 | Packets []*PonSimPacketCounter `protobuf:"bytes,2,rep,name=packets,proto3" json:"packets,omitempty"` |
| 273 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 274 | XXX_unrecognized []byte `json:"-"` |
| 275 | XXX_sizecache int32 `json:"-"` |
| 276 | } |
| 277 | |
| 278 | func (m *PonSimPortMetrics) Reset() { *m = PonSimPortMetrics{} } |
| 279 | func (m *PonSimPortMetrics) String() string { return proto.CompactTextString(m) } |
| 280 | func (*PonSimPortMetrics) ProtoMessage() {} |
| 281 | func (*PonSimPortMetrics) Descriptor() ([]byte, []int) { |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 282 | return fileDescriptor_352253851b8ea7c0, []int{5} |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 283 | } |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 284 | |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 285 | func (m *PonSimPortMetrics) XXX_Unmarshal(b []byte) error { |
| 286 | return xxx_messageInfo_PonSimPortMetrics.Unmarshal(m, b) |
| 287 | } |
| 288 | func (m *PonSimPortMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 289 | return xxx_messageInfo_PonSimPortMetrics.Marshal(b, m, deterministic) |
| 290 | } |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 291 | func (m *PonSimPortMetrics) XXX_Merge(src proto.Message) { |
| 292 | xxx_messageInfo_PonSimPortMetrics.Merge(m, src) |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 293 | } |
| 294 | func (m *PonSimPortMetrics) XXX_Size() int { |
| 295 | return xxx_messageInfo_PonSimPortMetrics.Size(m) |
| 296 | } |
| 297 | func (m *PonSimPortMetrics) XXX_DiscardUnknown() { |
| 298 | xxx_messageInfo_PonSimPortMetrics.DiscardUnknown(m) |
| 299 | } |
| 300 | |
| 301 | var xxx_messageInfo_PonSimPortMetrics proto.InternalMessageInfo |
| 302 | |
| 303 | func (m *PonSimPortMetrics) GetPortName() string { |
| 304 | if m != nil { |
| 305 | return m.PortName |
| 306 | } |
| 307 | return "" |
| 308 | } |
| 309 | |
| 310 | func (m *PonSimPortMetrics) GetPackets() []*PonSimPacketCounter { |
| 311 | if m != nil { |
| 312 | return m.Packets |
| 313 | } |
| 314 | return nil |
| 315 | } |
| 316 | |
| 317 | type PonSimMetrics struct { |
| 318 | Device string `protobuf:"bytes,1,opt,name=device,proto3" json:"device,omitempty"` |
| 319 | Metrics []*PonSimPortMetrics `protobuf:"bytes,2,rep,name=metrics,proto3" json:"metrics,omitempty"` |
| 320 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 321 | XXX_unrecognized []byte `json:"-"` |
| 322 | XXX_sizecache int32 `json:"-"` |
| 323 | } |
| 324 | |
| 325 | func (m *PonSimMetrics) Reset() { *m = PonSimMetrics{} } |
| 326 | func (m *PonSimMetrics) String() string { return proto.CompactTextString(m) } |
| 327 | func (*PonSimMetrics) ProtoMessage() {} |
| 328 | func (*PonSimMetrics) Descriptor() ([]byte, []int) { |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 329 | return fileDescriptor_352253851b8ea7c0, []int{6} |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 330 | } |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 331 | |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 332 | func (m *PonSimMetrics) XXX_Unmarshal(b []byte) error { |
| 333 | return xxx_messageInfo_PonSimMetrics.Unmarshal(m, b) |
| 334 | } |
| 335 | func (m *PonSimMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 336 | return xxx_messageInfo_PonSimMetrics.Marshal(b, m, deterministic) |
| 337 | } |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 338 | func (m *PonSimMetrics) XXX_Merge(src proto.Message) { |
| 339 | xxx_messageInfo_PonSimMetrics.Merge(m, src) |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 340 | } |
| 341 | func (m *PonSimMetrics) XXX_Size() int { |
| 342 | return xxx_messageInfo_PonSimMetrics.Size(m) |
| 343 | } |
| 344 | func (m *PonSimMetrics) XXX_DiscardUnknown() { |
| 345 | xxx_messageInfo_PonSimMetrics.DiscardUnknown(m) |
| 346 | } |
| 347 | |
| 348 | var xxx_messageInfo_PonSimMetrics proto.InternalMessageInfo |
| 349 | |
| 350 | func (m *PonSimMetrics) GetDevice() string { |
| 351 | if m != nil { |
| 352 | return m.Device |
| 353 | } |
| 354 | return "" |
| 355 | } |
| 356 | |
| 357 | func (m *PonSimMetrics) GetMetrics() []*PonSimPortMetrics { |
| 358 | if m != nil { |
| 359 | return m.Metrics |
| 360 | } |
| 361 | return nil |
| 362 | } |
| 363 | |
| 364 | type PonSimMetricsRequest struct { |
| 365 | Port int32 `protobuf:"varint,1,opt,name=port,proto3" json:"port,omitempty"` |
| 366 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 367 | XXX_unrecognized []byte `json:"-"` |
| 368 | XXX_sizecache int32 `json:"-"` |
| 369 | } |
| 370 | |
| 371 | func (m *PonSimMetricsRequest) Reset() { *m = PonSimMetricsRequest{} } |
| 372 | func (m *PonSimMetricsRequest) String() string { return proto.CompactTextString(m) } |
| 373 | func (*PonSimMetricsRequest) ProtoMessage() {} |
| 374 | func (*PonSimMetricsRequest) Descriptor() ([]byte, []int) { |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 375 | return fileDescriptor_352253851b8ea7c0, []int{7} |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 376 | } |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 377 | |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 378 | func (m *PonSimMetricsRequest) XXX_Unmarshal(b []byte) error { |
| 379 | return xxx_messageInfo_PonSimMetricsRequest.Unmarshal(m, b) |
| 380 | } |
| 381 | func (m *PonSimMetricsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 382 | return xxx_messageInfo_PonSimMetricsRequest.Marshal(b, m, deterministic) |
| 383 | } |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 384 | func (m *PonSimMetricsRequest) XXX_Merge(src proto.Message) { |
| 385 | xxx_messageInfo_PonSimMetricsRequest.Merge(m, src) |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 386 | } |
| 387 | func (m *PonSimMetricsRequest) XXX_Size() int { |
| 388 | return xxx_messageInfo_PonSimMetricsRequest.Size(m) |
| 389 | } |
| 390 | func (m *PonSimMetricsRequest) XXX_DiscardUnknown() { |
| 391 | xxx_messageInfo_PonSimMetricsRequest.DiscardUnknown(m) |
| 392 | } |
| 393 | |
| 394 | var xxx_messageInfo_PonSimMetricsRequest proto.InternalMessageInfo |
| 395 | |
| 396 | func (m *PonSimMetricsRequest) GetPort() int32 { |
| 397 | if m != nil { |
| 398 | return m.Port |
| 399 | } |
| 400 | return 0 |
| 401 | } |
| 402 | |
| 403 | func init() { |
| 404 | proto.RegisterType((*PonSimOnuDeviceInfo)(nil), "voltha.PonSimOnuDeviceInfo") |
| 405 | proto.RegisterType((*PonSimDeviceInfo)(nil), "voltha.PonSimDeviceInfo") |
| 406 | proto.RegisterType((*FlowTable)(nil), "voltha.FlowTable") |
| 407 | proto.RegisterType((*PonSimFrame)(nil), "voltha.PonSimFrame") |
| 408 | proto.RegisterType((*PonSimPacketCounter)(nil), "voltha.PonSimPacketCounter") |
| 409 | proto.RegisterType((*PonSimPortMetrics)(nil), "voltha.PonSimPortMetrics") |
| 410 | proto.RegisterType((*PonSimMetrics)(nil), "voltha.PonSimMetrics") |
| 411 | proto.RegisterType((*PonSimMetricsRequest)(nil), "voltha.PonSimMetricsRequest") |
| 412 | } |
| 413 | |
William Kurkian | ad74565 | 2019-03-20 08:45:51 -0400 | [diff] [blame] | 414 | func init() { proto.RegisterFile("voltha_protos/ponsim.proto", fileDescriptor_352253851b8ea7c0) } |
| 415 | |
| 416 | var fileDescriptor_352253851b8ea7c0 = []byte{ |
| 417 | // 555 bytes of a gzipped FileDescriptorProto |
| 418 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x94, 0x41, 0x6f, 0xd3, 0x4e, |
| 419 | 0x10, 0xc5, 0x93, 0xb4, 0x4d, 0x9b, 0x69, 0xf3, 0xff, 0xd3, 0x6d, 0xa9, 0xd2, 0xf4, 0x40, 0xb4, |
| 420 | 0x5c, 0x22, 0x50, 0x1d, 0xda, 0x88, 0x0b, 0x48, 0x80, 0x28, 0xb4, 0xe2, 0x40, 0x89, 0x36, 0xf4, |
| 421 | 0x82, 0x10, 0x96, 0x63, 0x4f, 0x52, 0x0b, 0x7b, 0xc7, 0xd8, 0xbb, 0xa9, 0xfa, 0x0d, 0xf9, 0x58, |
| 422 | 0xc8, 0xbb, 0x36, 0x89, 0xab, 0x84, 0xdb, 0xee, 0xf8, 0xe5, 0xf7, 0xe6, 0x8d, 0x27, 0x86, 0xee, |
| 423 | 0x9c, 0x22, 0x75, 0xeb, 0xb9, 0x49, 0x4a, 0x8a, 0xb2, 0x41, 0x42, 0x32, 0x0b, 0x63, 0xc7, 0xdc, |
| 424 | 0x58, 0xd3, 0x3e, 0xeb, 0x9e, 0xcc, 0x88, 0x66, 0x11, 0x0e, 0x4c, 0x75, 0xa2, 0xa7, 0x03, 0x8c, |
| 425 | 0x13, 0x75, 0x6f, 0x45, 0xdd, 0x27, 0x55, 0x00, 0x25, 0x28, 0xa7, 0x11, 0xdd, 0xb9, 0x67, 0x43, |
| 426 | 0x2b, 0xe0, 0x37, 0x70, 0x30, 0x22, 0x39, 0x0e, 0xe3, 0x2f, 0x52, 0x7f, 0xc0, 0x79, 0xe8, 0xe3, |
| 427 | 0x27, 0x39, 0x25, 0x76, 0x0c, 0x3b, 0x5a, 0x86, 0x6e, 0x42, 0xa9, 0xea, 0xd4, 0x7b, 0xf5, 0xfe, |
| 428 | 0x96, 0xd8, 0xd6, 0x32, 0x1c, 0x51, 0xaa, 0xd8, 0x53, 0x68, 0x67, 0x98, 0x86, 0x5e, 0xe4, 0x4a, |
| 429 | 0x1d, 0x4f, 0x30, 0xed, 0x34, 0x7a, 0xf5, 0x7e, 0x4b, 0xec, 0xd9, 0xe2, 0xb5, 0xa9, 0xf1, 0x1f, |
| 430 | 0xf0, 0xc8, 0x62, 0xab, 0x4c, 0xf9, 0x80, 0x29, 0x0b, 0xe6, 0x00, 0x36, 0x49, 0xea, 0xac, 0xd3, |
| 431 | 0xe8, 0x6d, 0xf4, 0x77, 0xcf, 0x4f, 0x1c, 0xdb, 0xb5, 0xb3, 0xa2, 0x33, 0x61, 0x84, 0x5c, 0x40, |
| 432 | 0xeb, 0x32, 0xa2, 0xbb, 0xaf, 0xde, 0x24, 0x42, 0xc6, 0x60, 0x73, 0x09, 0x6a, 0xce, 0xec, 0x0c, |
| 433 | 0xb6, 0xf2, 0xa0, 0x0b, 0xe4, 0x72, 0x74, 0x9a, 0x26, 0xae, 0x39, 0x67, 0xca, 0x53, 0x99, 0xb0, |
| 434 | 0x4a, 0x2e, 0x60, 0xd7, 0x1a, 0x5e, 0xa6, 0x5e, 0x8c, 0xec, 0x3f, 0x68, 0x84, 0x81, 0x61, 0xb6, |
| 435 | 0x44, 0x23, 0x0c, 0x58, 0x07, 0xb6, 0x13, 0xef, 0x3e, 0x22, 0x2f, 0x30, 0x89, 0xf7, 0x44, 0x79, |
| 436 | 0xcd, 0x83, 0x91, 0x56, 0x36, 0xd8, 0x86, 0x0d, 0x46, 0x5a, 0xe5, 0xc1, 0xf8, 0xdb, 0x72, 0xbc, |
| 437 | 0x23, 0xcf, 0xff, 0x89, 0xea, 0x82, 0xb4, 0x54, 0x98, 0xe6, 0x1d, 0x4b, 0x2f, 0xc6, 0x82, 0x6e, |
| 438 | 0xce, 0xec, 0x10, 0xb6, 0xe6, 0x5e, 0xa4, 0xd1, 0xd0, 0x37, 0x84, 0xbd, 0xf0, 0x19, 0xec, 0x17, |
| 439 | 0x00, 0x4a, 0xd5, 0x67, 0x54, 0x69, 0xe8, 0x67, 0xec, 0x04, 0x5a, 0xb9, 0x99, 0xbb, 0xc4, 0xd8, |
| 440 | 0xc9, 0x0b, 0xd7, 0x39, 0xe7, 0x65, 0xde, 0x67, 0x6e, 0xb6, 0x66, 0x9c, 0x95, 0x4e, 0x44, 0xa9, |
| 441 | 0xe5, 0xdf, 0xa1, 0x6d, 0x9f, 0x97, 0x26, 0x47, 0xd0, 0x0c, 0xcc, 0xd8, 0x0b, 0x87, 0xe2, 0xc6, |
| 442 | 0x86, 0xb0, 0x1d, 0x5b, 0x49, 0xc1, 0x3f, 0x7e, 0xc0, 0x5f, 0x34, 0x2a, 0x4a, 0x25, 0x7f, 0x06, |
| 443 | 0x87, 0x15, 0xba, 0xc0, 0x5f, 0x1a, 0x33, 0xb5, 0xea, 0xd5, 0x9d, 0xff, 0x6e, 0x40, 0xd3, 0x8a, |
| 444 | 0xd9, 0x2b, 0x68, 0x8d, 0x51, 0x06, 0xf6, 0x85, 0x1c, 0x54, 0x7d, 0x4c, 0xb1, 0x7b, 0xe4, 0xd8, |
| 445 | 0xf5, 0x77, 0xca, 0xf5, 0x77, 0x3e, 0xe6, 0xeb, 0xcf, 0x6b, 0xec, 0x1d, 0xb4, 0x05, 0xfa, 0x18, |
| 446 | 0xce, 0xd1, 0x28, 0x33, 0xb6, 0x46, 0xda, 0x5d, 0xc5, 0xe5, 0xb5, 0x17, 0x75, 0x76, 0x01, 0xed, |
| 447 | 0x2b, 0x54, 0x4b, 0x1b, 0xbc, 0x8e, 0xd0, 0xa9, 0x12, 0x16, 0xbf, 0xe0, 0x35, 0xf6, 0x06, 0xfe, |
| 448 | 0xbf, 0x49, 0x02, 0x4f, 0xe1, 0x62, 0x5f, 0xf7, 0x4b, 0xf9, 0xdf, 0xd2, 0x3f, 0x62, 0xbc, 0x86, |
| 449 | 0x9d, 0x2b, 0x54, 0xe3, 0x7c, 0x51, 0xd7, 0xfa, 0x3f, 0xae, 0xfa, 0x17, 0x33, 0xe6, 0xb5, 0xf7, |
| 450 | 0xa7, 0xdf, 0x9e, 0xcf, 0x42, 0x75, 0xab, 0x27, 0x8e, 0x4f, 0xb1, 0xf9, 0xf7, 0xfb, 0x94, 0x06, |
| 451 | 0x03, 0xab, 0x3e, 0x2d, 0x3e, 0x0a, 0x33, 0x2a, 0x0a, 0x93, 0xa6, 0xa9, 0x0c, 0xff, 0x04, 0x00, |
| 452 | 0x00, 0xff, 0xff, 0x62, 0xcb, 0x74, 0xbe, 0x77, 0x04, 0x00, 0x00, |
| 453 | } |
| 454 | |
William Kurkian | 1b363f4 | 2019-03-12 15:28:12 -0400 | [diff] [blame] | 455 | // Reference imports to suppress errors if they are not otherwise used. |
| 456 | var _ context.Context |
| 457 | var _ grpc.ClientConn |
| 458 | |
| 459 | // This is a compile-time assertion to ensure that this generated file |
| 460 | // is compatible with the grpc package it is being compiled against. |
| 461 | const _ = grpc.SupportPackageIsVersion4 |
| 462 | |
| 463 | // PonSimClient is the client API for PonSim service. |
| 464 | // |
| 465 | // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. |
| 466 | type PonSimClient interface { |
| 467 | SendFrame(ctx context.Context, in *PonSimFrame, opts ...grpc.CallOption) (*empty.Empty, error) |
| 468 | ReceiveFrames(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (PonSim_ReceiveFramesClient, error) |
| 469 | GetDeviceInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PonSimDeviceInfo, error) |
| 470 | UpdateFlowTable(ctx context.Context, in *FlowTable, opts ...grpc.CallOption) (*empty.Empty, error) |
| 471 | GetStats(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PonSimMetrics, error) |
| 472 | } |
| 473 | |
| 474 | type ponSimClient struct { |
| 475 | cc *grpc.ClientConn |
| 476 | } |
| 477 | |
| 478 | func NewPonSimClient(cc *grpc.ClientConn) PonSimClient { |
| 479 | return &ponSimClient{cc} |
| 480 | } |
| 481 | |
| 482 | func (c *ponSimClient) SendFrame(ctx context.Context, in *PonSimFrame, opts ...grpc.CallOption) (*empty.Empty, error) { |
| 483 | out := new(empty.Empty) |
| 484 | err := c.cc.Invoke(ctx, "/voltha.PonSim/SendFrame", in, out, opts...) |
| 485 | if err != nil { |
| 486 | return nil, err |
| 487 | } |
| 488 | return out, nil |
| 489 | } |
| 490 | |
| 491 | func (c *ponSimClient) ReceiveFrames(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (PonSim_ReceiveFramesClient, error) { |
| 492 | stream, err := c.cc.NewStream(ctx, &_PonSim_serviceDesc.Streams[0], "/voltha.PonSim/ReceiveFrames", opts...) |
| 493 | if err != nil { |
| 494 | return nil, err |
| 495 | } |
| 496 | x := &ponSimReceiveFramesClient{stream} |
| 497 | if err := x.ClientStream.SendMsg(in); err != nil { |
| 498 | return nil, err |
| 499 | } |
| 500 | if err := x.ClientStream.CloseSend(); err != nil { |
| 501 | return nil, err |
| 502 | } |
| 503 | return x, nil |
| 504 | } |
| 505 | |
| 506 | type PonSim_ReceiveFramesClient interface { |
| 507 | Recv() (*PonSimFrame, error) |
| 508 | grpc.ClientStream |
| 509 | } |
| 510 | |
| 511 | type ponSimReceiveFramesClient struct { |
| 512 | grpc.ClientStream |
| 513 | } |
| 514 | |
| 515 | func (x *ponSimReceiveFramesClient) Recv() (*PonSimFrame, error) { |
| 516 | m := new(PonSimFrame) |
| 517 | if err := x.ClientStream.RecvMsg(m); err != nil { |
| 518 | return nil, err |
| 519 | } |
| 520 | return m, nil |
| 521 | } |
| 522 | |
| 523 | func (c *ponSimClient) GetDeviceInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PonSimDeviceInfo, error) { |
| 524 | out := new(PonSimDeviceInfo) |
| 525 | err := c.cc.Invoke(ctx, "/voltha.PonSim/GetDeviceInfo", in, out, opts...) |
| 526 | if err != nil { |
| 527 | return nil, err |
| 528 | } |
| 529 | return out, nil |
| 530 | } |
| 531 | |
| 532 | func (c *ponSimClient) UpdateFlowTable(ctx context.Context, in *FlowTable, opts ...grpc.CallOption) (*empty.Empty, error) { |
| 533 | out := new(empty.Empty) |
| 534 | err := c.cc.Invoke(ctx, "/voltha.PonSim/UpdateFlowTable", in, out, opts...) |
| 535 | if err != nil { |
| 536 | return nil, err |
| 537 | } |
| 538 | return out, nil |
| 539 | } |
| 540 | |
| 541 | func (c *ponSimClient) GetStats(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PonSimMetrics, error) { |
| 542 | out := new(PonSimMetrics) |
| 543 | err := c.cc.Invoke(ctx, "/voltha.PonSim/GetStats", in, out, opts...) |
| 544 | if err != nil { |
| 545 | return nil, err |
| 546 | } |
| 547 | return out, nil |
| 548 | } |
| 549 | |
| 550 | // PonSimServer is the server API for PonSim service. |
| 551 | type PonSimServer interface { |
| 552 | SendFrame(context.Context, *PonSimFrame) (*empty.Empty, error) |
| 553 | ReceiveFrames(*empty.Empty, PonSim_ReceiveFramesServer) error |
| 554 | GetDeviceInfo(context.Context, *empty.Empty) (*PonSimDeviceInfo, error) |
| 555 | UpdateFlowTable(context.Context, *FlowTable) (*empty.Empty, error) |
| 556 | GetStats(context.Context, *empty.Empty) (*PonSimMetrics, error) |
| 557 | } |
| 558 | |
| 559 | func RegisterPonSimServer(s *grpc.Server, srv PonSimServer) { |
| 560 | s.RegisterService(&_PonSim_serviceDesc, srv) |
| 561 | } |
| 562 | |
| 563 | func _PonSim_SendFrame_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 564 | in := new(PonSimFrame) |
| 565 | if err := dec(in); err != nil { |
| 566 | return nil, err |
| 567 | } |
| 568 | if interceptor == nil { |
| 569 | return srv.(PonSimServer).SendFrame(ctx, in) |
| 570 | } |
| 571 | info := &grpc.UnaryServerInfo{ |
| 572 | Server: srv, |
| 573 | FullMethod: "/voltha.PonSim/SendFrame", |
| 574 | } |
| 575 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 576 | return srv.(PonSimServer).SendFrame(ctx, req.(*PonSimFrame)) |
| 577 | } |
| 578 | return interceptor(ctx, in, info, handler) |
| 579 | } |
| 580 | |
| 581 | func _PonSim_ReceiveFrames_Handler(srv interface{}, stream grpc.ServerStream) error { |
| 582 | m := new(empty.Empty) |
| 583 | if err := stream.RecvMsg(m); err != nil { |
| 584 | return err |
| 585 | } |
| 586 | return srv.(PonSimServer).ReceiveFrames(m, &ponSimReceiveFramesServer{stream}) |
| 587 | } |
| 588 | |
| 589 | type PonSim_ReceiveFramesServer interface { |
| 590 | Send(*PonSimFrame) error |
| 591 | grpc.ServerStream |
| 592 | } |
| 593 | |
| 594 | type ponSimReceiveFramesServer struct { |
| 595 | grpc.ServerStream |
| 596 | } |
| 597 | |
| 598 | func (x *ponSimReceiveFramesServer) Send(m *PonSimFrame) error { |
| 599 | return x.ServerStream.SendMsg(m) |
| 600 | } |
| 601 | |
| 602 | func _PonSim_GetDeviceInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 603 | in := new(empty.Empty) |
| 604 | if err := dec(in); err != nil { |
| 605 | return nil, err |
| 606 | } |
| 607 | if interceptor == nil { |
| 608 | return srv.(PonSimServer).GetDeviceInfo(ctx, in) |
| 609 | } |
| 610 | info := &grpc.UnaryServerInfo{ |
| 611 | Server: srv, |
| 612 | FullMethod: "/voltha.PonSim/GetDeviceInfo", |
| 613 | } |
| 614 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 615 | return srv.(PonSimServer).GetDeviceInfo(ctx, req.(*empty.Empty)) |
| 616 | } |
| 617 | return interceptor(ctx, in, info, handler) |
| 618 | } |
| 619 | |
| 620 | func _PonSim_UpdateFlowTable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 621 | in := new(FlowTable) |
| 622 | if err := dec(in); err != nil { |
| 623 | return nil, err |
| 624 | } |
| 625 | if interceptor == nil { |
| 626 | return srv.(PonSimServer).UpdateFlowTable(ctx, in) |
| 627 | } |
| 628 | info := &grpc.UnaryServerInfo{ |
| 629 | Server: srv, |
| 630 | FullMethod: "/voltha.PonSim/UpdateFlowTable", |
| 631 | } |
| 632 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 633 | return srv.(PonSimServer).UpdateFlowTable(ctx, req.(*FlowTable)) |
| 634 | } |
| 635 | return interceptor(ctx, in, info, handler) |
| 636 | } |
| 637 | |
| 638 | func _PonSim_GetStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 639 | in := new(empty.Empty) |
| 640 | if err := dec(in); err != nil { |
| 641 | return nil, err |
| 642 | } |
| 643 | if interceptor == nil { |
| 644 | return srv.(PonSimServer).GetStats(ctx, in) |
| 645 | } |
| 646 | info := &grpc.UnaryServerInfo{ |
| 647 | Server: srv, |
| 648 | FullMethod: "/voltha.PonSim/GetStats", |
| 649 | } |
| 650 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 651 | return srv.(PonSimServer).GetStats(ctx, req.(*empty.Empty)) |
| 652 | } |
| 653 | return interceptor(ctx, in, info, handler) |
| 654 | } |
| 655 | |
| 656 | var _PonSim_serviceDesc = grpc.ServiceDesc{ |
| 657 | ServiceName: "voltha.PonSim", |
| 658 | HandlerType: (*PonSimServer)(nil), |
| 659 | Methods: []grpc.MethodDesc{ |
| 660 | { |
| 661 | MethodName: "SendFrame", |
| 662 | Handler: _PonSim_SendFrame_Handler, |
| 663 | }, |
| 664 | { |
| 665 | MethodName: "GetDeviceInfo", |
| 666 | Handler: _PonSim_GetDeviceInfo_Handler, |
| 667 | }, |
| 668 | { |
| 669 | MethodName: "UpdateFlowTable", |
| 670 | Handler: _PonSim_UpdateFlowTable_Handler, |
| 671 | }, |
| 672 | { |
| 673 | MethodName: "GetStats", |
| 674 | Handler: _PonSim_GetStats_Handler, |
| 675 | }, |
| 676 | }, |
| 677 | Streams: []grpc.StreamDesc{ |
| 678 | { |
| 679 | StreamName: "ReceiveFrames", |
| 680 | Handler: _PonSim_ReceiveFrames_Handler, |
| 681 | ServerStreams: true, |
| 682 | }, |
| 683 | }, |
| 684 | Metadata: "voltha_protos/ponsim.proto", |
| 685 | } |