kdarapu | 283d154 | 2019-07-31 17:21:11 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2018-present Open Networking Foundation |
| 3 | |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package adapterif |
| 18 | |
| 19 | import ( |
| 20 | "context" |
Kent Hagerman | 2a07b86 | 2020-06-19 15:23:07 -0400 | [diff] [blame] | 21 | |
Maninder | dfadc98 | 2020-10-28 14:04:33 +0530 | [diff] [blame^] | 22 | "github.com/opencord/voltha-protos/v4/go/voltha" |
kdarapu | 283d154 | 2019-07-31 17:21:11 +0530 | [diff] [blame] | 23 | ) |
| 24 | |
| 25 | // CoreProxy interface for voltha-go coreproxy. |
| 26 | type CoreProxy interface { |
| 27 | UpdateCoreReference(deviceID string, coreReference string) |
| 28 | DeleteCoreReference(deviceID string) |
kdarapu | 283d154 | 2019-07-31 17:21:11 +0530 | [diff] [blame] | 29 | RegisterAdapter(ctx context.Context, adapter *voltha.Adapter, deviceTypes *voltha.DeviceTypes) error |
| 30 | DeviceUpdate(ctx context.Context, device *voltha.Device) error |
| 31 | PortCreated(ctx context.Context, deviceID string, port *voltha.Port) error |
Kent Hagerman | 2a07b86 | 2020-06-19 15:23:07 -0400 | [diff] [blame] | 32 | PortsStateUpdate(ctx context.Context, deviceID string, portTypeFilter uint32, operStatus voltha.OperStatus_Types) error |
kdarapu | 283d154 | 2019-07-31 17:21:11 +0530 | [diff] [blame] | 33 | DeleteAllPorts(ctx context.Context, deviceID string) error |
Kent Hagerman | 2a07b86 | 2020-06-19 15:23:07 -0400 | [diff] [blame] | 34 | GetDevicePort(ctx context.Context, deviceID string, portNo uint32) (*voltha.Port, error) |
| 35 | ListDevicePorts(ctx context.Context, deviceID string) ([]*voltha.Port, error) |
kdarapu | 283d154 | 2019-07-31 17:21:11 +0530 | [diff] [blame] | 36 | DeviceStateUpdate(ctx context.Context, deviceID string, |
serkant.uluderya | 2ae470f | 2020-01-21 11:13:09 -0800 | [diff] [blame] | 37 | connStatus voltha.ConnectStatus_Types, operStatus voltha.OperStatus_Types) error |
kdarapu | 283d154 | 2019-07-31 17:21:11 +0530 | [diff] [blame] | 38 | |
Naga Manjunath | e021735 | 2019-11-01 15:55:40 +0530 | [diff] [blame] | 39 | DevicePMConfigUpdate(ctx context.Context, pmConfigs *voltha.PmConfigs) error |
kdarapu | 283d154 | 2019-07-31 17:21:11 +0530 | [diff] [blame] | 40 | ChildDeviceDetected(ctx context.Context, parentDeviceID string, parentPortNo int, |
| 41 | childDeviceType string, channelID int, vendorID string, serialNumber string, onuID int64) (*voltha.Device, error) |
| 42 | |
| 43 | ChildDevicesLost(ctx context.Context, parentDeviceID string) error |
| 44 | ChildDevicesDetected(ctx context.Context, parentDeviceID string) error |
| 45 | GetDevice(ctx context.Context, parentDeviceID string, deviceID string) (*voltha.Device, error) |
| 46 | GetChildDevice(ctx context.Context, parentDeviceID string, kwargs map[string]interface{}) (*voltha.Device, error) |
| 47 | GetChildDevices(ctx context.Context, parentDeviceID string) (*voltha.Devices, error) |
| 48 | SendPacketIn(ctx context.Context, deviceID string, port uint32, pktPayload []byte) error |
Mahir Gunyel | fdee921 | 2019-10-16 16:52:21 -0700 | [diff] [blame] | 49 | DeviceReasonUpdate(ctx context.Context, deviceID string, deviceReason string) error |
serkant.uluderya | 2ae470f | 2020-01-21 11:13:09 -0800 | [diff] [blame] | 50 | PortStateUpdate(ctx context.Context, deviceID string, pType voltha.Port_PortType, portNo uint32, |
| 51 | operStatus voltha.OperStatus_Types) error |
kdarapu | 283d154 | 2019-07-31 17:21:11 +0530 | [diff] [blame] | 52 | } |