platform

package
v7.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

* Copyright 2020-2024 Open Networking Foundation (ONF) and the ONF Contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

Index

Constants

View Source
const (

	// MaxOnusPerPon is Max number of ONUs on any PON port
	MaxOnusPerPon = (1 << bitsForONUID)
	// MaxPonsPerOlt is Max number of PON ports on any OLT
	MaxPonsPerOlt = (1 << bitsForPONID)
	// MaxUnisPerOnu is the Max number of UNI ports on any ONU
	MaxUnisPerOnu = (1 << bitsForUniID)

	//Technology Profiles ID start value
	TpIDStart = 64
	//Technology Profiles ID end value
	TpIDEnd = 256
	//Number of Technology Profiles can be defined.
	TpRange = TpIDEnd - TpIDStart
)

Variables

This section is empty.

Functions

func ExtractAccessFromFlow

func ExtractAccessFromFlow(inPort, outPort uint32) (uint32, uint32, uint32, uint32)

ExtractAccessFromFlow returns AccessDevice information

func FlowExtractInfo

func FlowExtractInfo(ctx context.Context, flow *ofp.OfpFlowStats, flowDirection string) (uint32, uint32, uint32, uint32, uint32, uint32, error)

FlowExtractInfo fetches uniport from the flow, based on which it gets and returns ponInf, onuID, uniID, inPort and ethType

func IntfIDFromNniPortNum

func IntfIDFromNniPortNum(ctx context.Context, portNum uint32) (uint32, error)

IntfIDFromNniPortNum returns Intf ID derived from portNum

func IntfIDFromPonPortNum

func IntfIDFromPonPortNum(ctx context.Context, portNum uint32) (uint32, error)

IntfIDFromPonPortNum returns Intf ID derived from portNum

func IntfIDFromUniPortNum

func IntfIDFromUniPortNum(portNum uint32) uint32

IntfIDFromUniPortNum returns IntfID derived from portNum

func IntfIDToPortNo

func IntfIDToPortNo(intfID uint32, intfType voltha.Port_PortType) uint32

IntfIDToPortNo returns portId derived from intftype, intfId and portType

func IntfIDToPortTypeName

func IntfIDToPortTypeName(intfID uint32) voltha.Port_PortType

IntfIDToPortTypeName returns port type derived from the intfId

func IsControllerBoundFlow

func IsControllerBoundFlow(outPort uint32) bool

IsControllerBoundFlow returns true/false

func IsUpstream

func IsUpstream(outPort uint32) bool

IsUpstream returns true for Upstream and false for downstream

func MkUniPortNum

func MkUniPortNum(ctx context.Context, intfID, onuID, uniID uint32) uint32

MkUniPortNum returns new UNIportNum based on intfID, inuID and uniID

func OnuIDFromPortNum

func OnuIDFromPortNum(portNum uint32) uint32

OnuIDFromPortNum returns ONUID derived from portNumber

func OnuIDFromUniPortNum

func OnuIDFromUniPortNum(portNum uint32) uint32

OnuIDFromUniPortNum returns onuId from give portNum information.

func PortNoToIntfID

func PortNoToIntfID(portno uint32, intfType voltha.Port_PortType) uint32

PortNoToIntfID returns portnumber derived from interfaceID

func UniIDFromPortNum

func UniIDFromPortNum(portNum uint32) uint32

UniIDFromPortNum return UniID derived from portNum

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL