ani

package
v0.0.0-...-4bc4564 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

* Copyright (c) 2019 - present. Boling Consulting Solutions (bcsw.net) * * 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 AniDisabledState fsm.State = "disabled" // Initial state
View Source
const AniEnabledState fsm.State = "enabled" // ANI has be activated, normal state
View Source
const AniImpairedState fsm.State = "impaired" // ANI has some type of fault
View Source
const InitialState fsm.State = "initial" // State after creation of ANI

Variables

View Source
var EnhancedFecPMNameToIndex map[string]uint
View Source
var EnhancedTcPmNameToIndex map[string]uint
View Source
var GalPMToIndex map[string]uint
View Source
var GemNetworkNameToIndex map[string]uint
View Source
var TcPmNameToIndex map[string]uint
View Source
var XgsPonDownstreamNameToIndex map[string]uint
View Source
var XgsPonUpstreamNameToIndex map[string]uint

Functions

func NewEnhancedFECStatistics

func NewEnhancedFECStatistics(instanceID uint16, control *interfaces.PMControlBlock, intervalEndTime uint8) *interfaces.Statistics

func NewEnhancedTcPMStatistics

func NewEnhancedTcPMStatistics(instanceID uint16, control *interfaces.PMControlBlock, intervalEndTime uint8) *interfaces.Statistics

func NewFECStatistics

func NewFECStatistics(instanceID uint16, control *interfaces.PMControlBlock, intervalEndTime uint8) *interfaces.Statistics

func NewGalPM

func NewGalPM(instanceID uint16, control *interfaces.PMControlBlock, intervalEndTime uint8) *interfaces.Statistics

func NewGemPortNetworkCtpPM

func NewGemPortNetworkCtpPM(instanceID uint16, control *interfaces.PMControlBlock, intervalEndTime uint8) *interfaces.Statistics

func NewTcPMStatistics

func NewTcPMStatistics(instanceID uint16, control *interfaces.PMControlBlock, intervalEndTime uint8) *interfaces.Statistics

func NewXGPonDownstreamStatistics

func NewXGPonDownstreamStatistics(instanceID uint16, control *interfaces.PMControlBlock, intervalEndTime uint8) *interfaces.Statistics

func NewXGPonUpstreamStatistics

func NewXGPonUpstreamStatistics(instanceID uint16, control *interfaces.PMControlBlock, intervalEndTime uint8) *interfaces.Statistics

Types

type ANI

type ANI struct {
	Onu        interfaces.IOnu // Associated ONU
	PortNumber uint16          // Port number

	FSM *fsm.Machine // Finite state machine
	// contains filtered or unexported fields
}

ANI is used to model the ANI/PON interface of an ONU

func NewANI

func NewANI(onu interfaces.IOnu, portNumber uint16) *ANI

NewANI is used to construct a new ANI/PON port for an ONU

func (*ANI) AddTimers

func (ani *ANI) AddTimers(timer *time.Timer)

func (*ANI) AniGHandler

func (ani *ANI) AniGHandler(request *me.ManagedEntity, existing *interfaces.MeDbEntry, mt omci.MessageType) gopacket.SerializableLayer

func (*ANI) AniPerformanceMonitoringHistoryDataHandler

func (ani *ANI) AniPerformanceMonitoringHistoryDataHandler(request *me.ManagedEntity, existing *interfaces.MeDbEntry, mt omci.MessageType) gopacket.SerializableLayer

func (*ANI) Configuration

func (ani *ANI) Configuration() interface{}

func (*ANI) Disable

func (ani *ANI) Disable() error

Disable sends the equivalent of an 'disable' event to the FSM

func (*ANI) Enable

func (ani *ANI) Enable() error

Enable will move an ANI into the discoverable state

func (*ANI) ID

func (ani *ANI) ID() uint

func (*ANI) Input

func (ani *ANI) Input() chan<- interface{}

func (*ANI) IsEnabled

func (ani *ANI) IsEnabled() bool

IsEnabled returns the current ANI enable state. An enabled ANI is activated and able to pass OMCI messages

func (*ANI) Name

func (ani *ANI) Name() string

func (*ANI) Parent

func (ani *ANI) Parent() interfaces.ICommon

Parent returns the parent object of this ANI (an ONU)

func (*ANI) RxFrame

func (ani *ANI) RxFrame(packet gopacket.Packet, sender interface{})

RxFrame handles frame reception from the PON and is responsible for looking up a matching GEM Port to forward the packet to while updating approprate statistics

func (*ANI) State

func (ani *ANI) State() fsm.State

func (*ANI) StateTransitionCallback

func (ani *ANI) StateTransitionCallback(state fsm.State) error

StateTransitionCallback is called after transition to the new state and when the FSM mutex is locked. If synchronous, it will call directly into method. If async, uses a go routine to call the callback

func (*ANI) String

func (ani *ANI) String() string

Convert type to string

type GemInternetworkingTP

type GemInternetworkingTP struct {
	EntityID              uint16
	GemPortNetworkCtp     uint16
	InterworkingOption    byte
	ServiceProfilePointer uint16
	InterworkingTP        uint16
	GalProfilePointer     uint16
	ExtendedPM            *interfaces.Statistics
	ExtendedPM64Bit       *interfaces.Statistics
	// contains filtered or unexported fields
}

func NewGemInternetworkingTP

func NewGemInternetworkingTP(onu interfaces.IOnu, request *me.ManagedEntity) (*GemInternetworkingTP, me.OmciErrors)

func (*GemInternetworkingTP) Get

Get is responsible for parsing the attribute values to pulling the data from the MIB

func (*GemInternetworkingTP) RxFrame

func (gem *GemInternetworkingTP) RxFrame(packet gopacket.Packet, sender interface{})

RxFrame handles frame reception from the PON and is responsible for looking up a matching GEM Port to forward the packet to while updating approprate statistics

func (*GemInternetworkingTP) Set

Set is responsible for parsing the attribute values to set and after validation, updating both the cached struct and the MIB database

type GemPortNetworkCtp

type GemPortNetworkCtp struct {
	EntityID                  uint16
	PortId                    uint16
	TContPointer              uint16
	Direction                 byte
	UpstreamTrafficManagement uint16
	UpstreamTD                uint16
	DownStreamPriorityQueue   uint16
	DownstreamTD              uint16
	Statistics                *interfaces.Statistics // TODO: Enforce referential integrity
	// contains filtered or unexported fields
}

func NewGemPortNetworkCtp

func NewGemPortNetworkCtp(onu interfaces.IOnu, request *me.ManagedEntity) (*GemPortNetworkCtp, me.OmciErrors)

func (*GemPortNetworkCtp) Get

Get is responsible for parsing the attribute values to pulling the data from the MIB

func (*GemPortNetworkCtp) RxFrame

func (gemPort *GemPortNetworkCtp) RxFrame(packet gopacket.Packet, sender interface{})

RxFrame handles frame reception from the PON and is responsible for looking up a matching GEM Port to forward the packet to while updating approprate statistics

func (*GemPortNetworkCtp) Set

Set is responsible for parsing the attribute values to set and after validation, updating both the cached struct and the MIB database

type Ieee8021pMapper

type Ieee8021pMapper struct {
	EntityID uint16
	// contains filtered or unexported fields
}

func NewIeee8021pMapper

func NewIeee8021pMapper(onu interfaces.IOnu, request *me.ManagedEntity) (*Ieee8021pMapper, me.OmciErrors)

func (*Ieee8021pMapper) Get

Get is responsible for parsing the attribute values to pulling the data from the MIB

func (*Ieee8021pMapper) RxFrame

func (mapper *Ieee8021pMapper) RxFrame(packet gopacket.Packet, sender interface{})

RxFrame handles frame reception from the PON and is responsible for looking up a matching GEM Port to forward the packet to while updating appropriate statistics

func (*Ieee8021pMapper) Set

Set is responsible for parsing the attribute values to set and after validation, updating both the cached struct and the MIB database

type TCont

type TCont struct {
	EntityID uint16
	AllocID  uint16
	Policy   uint8
	// contains filtered or unexported fields
}

TCont wraps a TCont Entity ID and is allocated on the first set operation to the AllocID attribute when it does not equal the Free Entity ID.

func NewTCont

func NewTCont(onu interfaces.IOnu, eid uint16, attributes me.AttributeValueMap) (*TCont, me.OmciErrors)

func (*TCont) GetSetHandler

func (tCont *TCont) GetSetHandler(request *me.ManagedEntity, existing *interfaces.MeDbEntry, mt omci.MessageType) gopacket.SerializableLayer

func (*TCont) RxFrame

func (tCont *TCont) RxFrame(packet gopacket.Packet, sender interface{})

RxFrame handles frame reception from the PON and is responsible for looking up a matching GEM Port to forward the packet to while updating approprate statistics

Jump to

Keyboard shortcuts

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