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. *
* Copyright (c) 2018 - 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. *
* Copyright (c) 2018 - 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. *
* 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. *
* 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. *
* Copyright (c) 2018 - 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
- Variables
- func NewEnergyConsumptionPM(instanceID uint16, control *interfaces.PMControlBlock, intervalEndTime uint8) *interfaces.Statistics
- func NewLastTxMsg(message []byte) *lastTxMsg
- func NewLastTxMsgMap() *lastTxMsgMap
- func NewONU(parent interfaces.ICommon, serialNumber string, c *config.OnuConfig, ...) interfaces.IOnu
- func StartupGenerator(config *config.OnuConfig) (func(sync.Locker, map[string]interfaces.ICommon) <-chan interfaces.ICommon, ...)
- type AlarmTable
- type GetNextMap
- func (gnm *GetNextMap) AddMibUploadEntry(classID me.ClassID, entries []gopacket.SerializableLayer)
- func (gnm *GetNextMap) AddTableEntries(classID me.ClassID, instanceID uint16, index uint, data []uint8, baseline bool) error
- func (gnm *GetNextMap) DeleteTableEntries(classID me.ClassID, instanceID uint16) error
- func (gnm *GetNextMap) GetNextMibUploadEntry(classID me.ClassID, sequenceNumber uint) (gopacket.SerializableLayer, error)
- func (gnm *GetNextMap) GetNextTableEntry(classID me.ClassID, instanceID uint16, index uint, sequenceNumber uint) (gopacket.SerializableLayer, error)
- func (gnm *GetNextMap) OnMibReset() error
- func (gnm *GetNextMap) Shutdown()
- type GetNextMapEntry
- type MeAlarmClass
- type MeAlarmEntity
- type MibDatabase
- func (db *MibDatabase) AllocateTCont() (uint16, error)
- func (db *MibDatabase) Delete(classId me.ClassID, instanceId uint16) error
- func (db *MibDatabase) DisableMDSIncrement()
- func (db *MibDatabase) EnableMDSIncrement()
- func (db *MibDatabase) GetAniMap() map[uint16]interfaces.MeDbInstance
- func (db *MibDatabase) GetFreeTContAllocID() uint16
- func (db *MibDatabase) GetPptpMap() map[uint16]interfaces.MeDbInstance
- func (db *MibDatabase) GetUniGMap() map[uint16]interfaces.MeDbInstance
- func (db *MibDatabase) GetVeipMap() map[uint16]interfaces.MeDbInstance
- func (db *MibDatabase) QueryAttribute(classID me.ClassID, instanceID uint16, index uint) (interface{}, error)
- func (db *MibDatabase) QueryClass(classID me.ClassID) (map[uint16]interfaces.MeDbInstance, error)
- func (db *MibDatabase) QueryInstance(classID me.ClassID, instanceID uint16) (*interfaces.MeDbEntry, error)
- func (db *MibDatabase) ReadJSON(reader io.Reader) error
- func (db *MibDatabase) ReadYAML(reader io.Reader) error
- func (db *MibDatabase) ReleaseTCont(eid uint16) error
- func (db *MibDatabase) Set(classID me.ClassID, instanceID uint16, attributes me.AttributeValueMap, ...) me.OmciErrors
- func (db *MibDatabase) SetAttribute(classID me.ClassID, instanceID uint16, attr string, value interface{}) error
- func (db *MibDatabase) SnapshotDatabase(lock bool) (*MibDatabase, error)
- func (db *MibDatabase) UnmarshalJSON(b []byte) error
- func (db *MibDatabase) WriteJSON(path string) error
- func (db *MibDatabase) WriteYAML(path string) error
- type ONU
- func (onu *ONU) AddManagedEntity(item interface{}, attr me.AttributeValueMap) me.OmciErrors
- func (onu *ONU) AddTimers(timer *time.Timer)
- func (onu *ONU) Configuration() interface{}
- func (onu *ONU) DeleteManagedEntity(cid me.ClassID, eid uint16) interface{}
- func (onu *ONU) EnergyConsumptionPerformanceMonitoringHistoryDataHandler(request *me.ManagedEntity, existing *interfaces.MeDbEntry, mt omci.MessageType) gopacket.SerializableLayer
- func (onu *ONU) GetBridgeManager() interfaces.IBridgeManager
- func (onu *ONU) GetBridgeService(eid uint16) interface{}
- func (onu *ONU) GetCurrentIntervalEndTime() uint8
- func (onu *ONU) GetHandler(request *me.ManagedEntity, existing me.AttributeValueMap) gopacket.SerializableLayer
- func (onu *ONU) GetMIB() interfaces.IMib
- func (onu *ONU) GetManagedEntity(cid me.ClassID, eid uint16) interface{}
- func (onu *ONU) GetMibCache() interfaces.OnuReadOnlyInfo
- func (onu *ONU) GetNextMacAddress() []byte
- func (onu *ONU) ID() uint
- func (onu *ONU) Input() chan<- interface{}
- func (onu *ONU) IsEnabled() bool
- func (onu *ONU) IsOperational() bool
- func (onu *ONU) Name() string
- func (onu *ONU) OnCreateRequest(msgObj *omci.CreateRequest) gopacket.SerializableLayer
- func (onu *ONU) OnDeleteRequest(msgObj *omci.DeleteRequest) gopacket.SerializableLayer
- func (onu *ONU) OnGetNextRequest(msgObj *omci.GetNextRequest) (gopacket.SerializableLayer, error)
- func (onu *ONU) OnGetRequest(msgObj *omci.GetRequest) gopacket.SerializableLayer
- func (onu *ONU) OnMibReset() error
- func (onu *ONU) OnMibUploadNextRequest(seqNumber uint16) (gopacket.SerializableLayer, error)
- func (onu *ONU) OnMibUploadRequest() (gopacket.SerializableLayer, error)
- func (onu *ONU) OnSetRequest(msgObj *omci.SetRequest) gopacket.SerializableLayer
- func (onu *ONU) OnSynchronizeTime(time time.Time, delta time.Duration, dateProvided bool) (gopacket.SerializableLayer, error)
- func (onu *ONU) OnuDataHandler(request *me.ManagedEntity, existing *interfaces.MeDbEntry, mt omci.MessageType) gopacket.SerializableLayer
- func (onu *ONU) Parent() interfaces.ICommon
- func (onu *ONU) SetActiveANI(eid uint16) error
- func (onu *ONU) SetHandler(request *me.ManagedEntity, changed me.AttributeValueMap, result me.Results, ...) gopacket.SerializableLayer
- func (onu *ONU) SetOnuID(id uint) error
- func (onu *ONU) State() fsm.State
- func (onu *ONU) StateTransitionCallback(state fsm.State) error
- func (onu *ONU) String() string
- type ONUG
- type Omcc
- func (cc *Omcc) OnMibReset() error
- func (cc *Omcc) OnRanging() error
- func (cc *Omcc) RxOmci(request *interfaces.OmciRequest) error
- func (cc *Omcc) String() string
- func (cc *Omcc) TxAutonomousMessage(responseStream omci_pb.OMCI_OmciChannelServer, response *omci_pb.OmciResponse)
- func (cc *Omcc) TxOmci(responseStream omci_pb.OMCI_OmciChannelServer, response *omci_pb.OmciResponse)
- type PMClock
- func (p *PMClock) Now() time.Time
- func (p *PMClock) OnSynchronizeTimeRequest(time time.Time, delta time.Duration, dateProvided bool)
- func (p *PMClock) Seconds() int
- func (p *PMClock) Start()
- func (p *PMClock) Stop()
- func (p *PMClock) Subscribe(observer chan<- interface{})
- func (p *PMClock) Unsubscribe(observer chan<- interface{})
- type PMTimerInterval
- type Port
- type Slot
- type SlotPortModel
Constants ¶
const DisabledState fsm.State = "disabled" // Shutdown
const DiscoverableState fsm.State = "discoverable" // Can be discovered, PLOAM only
const ImpairedState fsm.State = "impaired" // Fault (or rebooting)
const InitialState fsm.State = "initial" // State after creation of ONU
const OperationalState fsm.State = "operational" // Activated, O5 Operational state
const ShutdownState fsm.State = "shutdown" // Exiting
const StartingState fsm.State = "starting" // Set up of ONU occurs (no OMCI)
const UnassignedOnuID uint = 0xFFFF // Assigned at ONU activation
Variables ¶
var EnergyConsumptionNameToIndex map[string]uint
Functions ¶
func NewEnergyConsumptionPM ¶
func NewEnergyConsumptionPM(instanceID uint16, control *interfaces.PMControlBlock, intervalEndTime uint8) *interfaces.Statistics
func NewLastTxMsg ¶
func NewLastTxMsg(message []byte) *lastTxMsg
func NewLastTxMsgMap ¶
func NewLastTxMsgMap() *lastTxMsgMap
func NewONU ¶
func NewONU(parent interfaces.ICommon, serialNumber string, c *config.OnuConfig, url string) interfaces.IOnu
NewOnu creates a newly initialized ONU ONU
func StartupGenerator ¶
func StartupGenerator(config *config.OnuConfig) (func(sync.Locker, map[string]interfaces.ICommon) <-chan interfaces.ICommon, error)
StartupGenerator returns a generator function that is responsible for ONU startup based on the startup pattern requested
Types ¶
type AlarmTable ¶
type AlarmTable struct {
// contains filtered or unexported fields
}
AlarmTable maintains the current MIB database for a single ONU
func NewAlarmTable ¶
func NewAlarmTable() *AlarmTable
NewAlarmTable creates a new Alarm Table for an ONU
type GetNextMap ¶
type GetNextMap struct {
// contains filtered or unexported fields
}
getNextMap is used to hold ME Instances that may receive a get-next operation on. This includes MibUploadNext, GetAllAlarmsNext, and GetNext message types. After 60 seconds after the last operation and a specific entry, the ME snapshots are dropped
func NewGetNextMap ¶
func NewGetNextMap() *GetNextMap
func (*GetNextMap) AddMibUploadEntry ¶
func (gnm *GetNextMap) AddMibUploadEntry(classID me.ClassID, entries []gopacket.SerializableLayer)
func (*GetNextMap) AddTableEntries ¶
func (*GetNextMap) DeleteTableEntries ¶
func (gnm *GetNextMap) DeleteTableEntries(classID me.ClassID, instanceID uint16) error
func (*GetNextMap) GetNextMibUploadEntry ¶
func (gnm *GetNextMap) GetNextMibUploadEntry(classID me.ClassID, sequenceNumber uint) (gopacket.SerializableLayer, error)
GetNextInstance is for handling database snapshots where entries are encoded with specific OMCI Frames to return
func (*GetNextMap) GetNextTableEntry ¶
func (gnm *GetNextMap) GetNextTableEntry(classID me.ClassID, instanceID uint16, index uint, sequenceNumber uint) (gopacket.SerializableLayer, error)
func (*GetNextMap) OnMibReset ¶
func (gnm *GetNextMap) OnMibReset() error
func (*GetNextMap) Shutdown ¶
func (gnm *GetNextMap) Shutdown()
type GetNextMapEntry ¶
type GetNextMapEntry struct {
// contains filtered or unexported fields
}
type MeAlarmClass ¶
type MeAlarmClass struct {
// contains filtered or unexported fields
}
MeAlarmClass encapsulates all instances of a specific ME Class
type MeAlarmEntity ¶
type MeAlarmEntity struct {
// contains filtered or unexported fields
}
MeAlarmEntity encapsulates the Attributes for a single instance of an ME Class
type MibDatabase ¶
type MibDatabase struct { MibDataSync uint8 `yaml:"mds" json:"mds"` Classes map[me.ClassID]interfaces.MeDbClass `yaml:"classes" json:"classes"` // contains filtered or unexported fields }
MibDatabase maintains the current MIB database for a single ONU
func NewMibDatabase ¶
func NewMibDatabase() *MibDatabase
NewMibDatabase creates a new MIB Database for an ONU
func (*MibDatabase) AllocateTCont ¶
func (db *MibDatabase) AllocateTCont() (uint16, error)
AllocateTCont returns the EID of a free TCONT. This TCONT, if provided, is owned by the caller and the caller is responsible for setting the proper AllocID with a Set operation.
func (*MibDatabase) Delete ¶
func (db *MibDatabase) Delete(classId me.ClassID, instanceId uint16) error
func (*MibDatabase) DisableMDSIncrement ¶
func (db *MibDatabase) DisableMDSIncrement()
DisableMDSIncrement is used to disable MIB Data Sync increment on successful Create and Set attributes. Currently, an OLT using this library would disable this only during a MIB Upload.
func (*MibDatabase) EnableMDSIncrement ¶
func (db *MibDatabase) EnableMDSIncrement()
EnableMDSIncrement is used to enable MIB Data Sync increment on successful Create and Set attributes. Currently, an OLT using this library would disable this only during a MIB Upload.
func (*MibDatabase) GetAniMap ¶
func (db *MibDatabase) GetAniMap() map[uint16]interfaces.MeDbInstance
func (*MibDatabase) GetFreeTContAllocID ¶
func (db *MibDatabase) GetFreeTContAllocID() uint16
GetFreeTContAllocID returns the value that is used to specify that a TCONT is not currently assigned to an ONU for data traffic
func (*MibDatabase) GetPptpMap ¶
func (db *MibDatabase) GetPptpMap() map[uint16]interfaces.MeDbInstance
func (*MibDatabase) GetUniGMap ¶
func (db *MibDatabase) GetUniGMap() map[uint16]interfaces.MeDbInstance
func (*MibDatabase) GetVeipMap ¶
func (db *MibDatabase) GetVeipMap() map[uint16]interfaces.MeDbInstance
func (*MibDatabase) QueryAttribute ¶
func (*MibDatabase) QueryClass ¶
func (db *MibDatabase) QueryClass(classID me.ClassID) (map[uint16]interfaces.MeDbInstance, error)
QueryClass returns all instances of a Managed Entity. The results are a copy of what is in the database
func (*MibDatabase) QueryInstance ¶
func (db *MibDatabase) QueryInstance(classID me.ClassID, instanceID uint16) (*interfaces.MeDbEntry, error)
QueryInstance returns a unique Managed Entity Class instance. This instances is a copy of what is in the database. For table attributes, the entire table is returned
func (*MibDatabase) ReadJSON ¶
func (db *MibDatabase) ReadJSON(reader io.Reader) error
ReadYAML reads in a Managed Entity Database (JSON) file
func (*MibDatabase) ReadYAML ¶
func (db *MibDatabase) ReadYAML(reader io.Reader) error
ReadYAML reads in a Managed Entity Database (YAML) file
func (*MibDatabase) ReleaseTCont ¶
func (db *MibDatabase) ReleaseTCont(eid uint16) error
ReleaseTCont is used to release an allocated TCONT once it is not longer in use
func (*MibDatabase) Set ¶
func (db *MibDatabase) Set(classID me.ClassID, instanceID uint16, attributes me.AttributeValueMap, createIfNeeded ...bool) me.OmciErrors
func (*MibDatabase) SetAttribute ¶
func (db *MibDatabase) SetAttribute(classID me.ClassID, instanceID uint16, attr string, value interface{}) error
SetAttribute is for internal ONU use and is often called to set read-only status/gauge values in the database on a periodic basis. It does not update the MDS and should not be called due to an OLT Set request
func (*MibDatabase) SnapshotDatabase ¶
func (db *MibDatabase) SnapshotDatabase(lock bool) (*MibDatabase, error)
SnapshotDatabase will get an exact copy of an existing MIB Database
func (*MibDatabase) UnmarshalJSON ¶
func (db *MibDatabase) UnmarshalJSON(b []byte) error
UnmarshalJSON is a custom JSON unmarshaller that will refactor integer values (decoded initially as float32) and []byte values (decoded initially as Base64-encoded strings) into their proper sizes
func (*MibDatabase) WriteJSON ¶
func (db *MibDatabase) WriteJSON(path string) error
WriteJSON outputs a Managed Entity Database to a JSON encoded file
func (*MibDatabase) WriteYAML ¶
func (db *MibDatabase) WriteYAML(path string) error
WriteYAML outputs a Managed Entity Database to a YAML encoded file
type ONU ¶
type ONU struct { Pon interfaces.ICommon // PON Port SerialNumber string // ASCII serial number (not base64) URL string // Vendor Info URL FSM *fsm.Machine // Finite state machine PMClock *PMClock // contains filtered or unexported fields }
ONU is used to encapsulates a single simulated ONU
func (*ONU) AddManagedEntity ¶
func (onu *ONU) AddManagedEntity(item interface{}, attr me.AttributeValueMap) me.OmciErrors
AddManagedEntity adds a variety of ONU created Managed Entity structs to the ONU. It is called on an OMCI create request while the ONU mutex is held.
func (*ONU) Configuration ¶
func (onu *ONU) Configuration() interface{}
func (*ONU) DeleteManagedEntity ¶
DeleteManagedEntity deletes a variety of ONU created Managed Entity structs to the ONU. It is called on an OMCI create request while the ONU mutex is held.
func (*ONU) EnergyConsumptionPerformanceMonitoringHistoryDataHandler ¶
func (onu *ONU) EnergyConsumptionPerformanceMonitoringHistoryDataHandler(request *me.ManagedEntity, existing *interfaces.MeDbEntry, mt omci.MessageType) gopacket.SerializableLayer
func (*ONU) GetBridgeManager ¶
func (onu *ONU) GetBridgeManager() interfaces.IBridgeManager
GetBridgeManager gets the bridge manager for this ONU
func (*ONU) GetBridgeService ¶
func (*ONU) GetCurrentIntervalEndTime ¶
func (*ONU) GetHandler ¶
func (onu *ONU) GetHandler(request *me.ManagedEntity, existing me.AttributeValueMap) gopacket.SerializableLayer
GetHandler encodes the requested existing attributes into a GET Response. MEs that contain all their data in the MIB can call this directly. For MEs that have to update status can update the value, save to MIB, and then save to the 'existing' Attribute Value map and then call this method.
If the get request is sending back the size of any table attributes, the caller will need to update the 'existing' attribute value map before calling this method since the original existing data is from the MIB and it is an octet string.
func (*ONU) GetManagedEntity ¶
GetManagedEntity retrieves a variety of ONU created Managed Entity structs to the ONU. It is called on an OMCI create request while the ONU mutex is held.
func (*ONU) GetMibCache ¶
func (onu *ONU) GetMibCache() interfaces.OnuReadOnlyInfo
func (*ONU) GetNextMacAddress ¶
func (*ONU) Input ¶
func (onu *ONU) Input() chan<- interface{}
Input returns the channel that can receive requests from other objects
func (*ONU) IsEnabled ¶
IsEnabled returns the current ONU enable state. An enabled ONU will receive/transmit OMCI messages.
func (*ONU) IsOperational ¶
IsOperational returns true if the ONU is in the operational state and can process OMCI (non-PLOAM) messages
func (*ONU) OnCreateRequest ¶
func (onu *ONU) OnCreateRequest(msgObj *omci.CreateRequest) gopacket.SerializableLayer
func (*ONU) OnDeleteRequest ¶
func (onu *ONU) OnDeleteRequest(msgObj *omci.DeleteRequest) gopacket.SerializableLayer
func (*ONU) OnGetNextRequest ¶
func (onu *ONU) OnGetNextRequest(msgObj *omci.GetNextRequest) (gopacket.SerializableLayer, error)
func (*ONU) OnGetRequest ¶
func (onu *ONU) OnGetRequest(msgObj *omci.GetRequest) gopacket.SerializableLayer
OnGetRequest is responsible for processing a GET Request from an OLT. It will look up the requested ME Instance and if found, returned the requested attributes.
func (*ONU) OnMibReset ¶
func (*ONU) OnMibUploadNextRequest ¶
func (onu *ONU) OnMibUploadNextRequest(seqNumber uint16) (gopacket.SerializableLayer, error)
func (*ONU) OnMibUploadRequest ¶
func (onu *ONU) OnMibUploadRequest() (gopacket.SerializableLayer, error)
func (*ONU) OnSetRequest ¶
func (onu *ONU) OnSetRequest(msgObj *omci.SetRequest) gopacket.SerializableLayer
func (*ONU) OnSynchronizeTime ¶
func (*ONU) OnuDataHandler ¶
func (onu *ONU) OnuDataHandler(request *me.ManagedEntity, existing *interfaces.MeDbEntry, mt omci.MessageType) gopacket.SerializableLayer
func (*ONU) Parent ¶
func (onu *ONU) Parent() interfaces.ICommon
Parent returns the parent object of this ONU (a PON)
func (*ONU) SetActiveANI ¶
func (*ONU) SetHandler ¶
func (onu *ONU) SetHandler(request *me.ManagedEntity, changed me.AttributeValueMap, result me.Results, failed uint16, unsupported uint16) gopacket.SerializableLayer
func (*ONU) StateTransitionCallback ¶
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
type ONUG ¶
type ONUG struct {
// contains filtered or unexported fields
}
ONUG is used to centralize the ONU-G, ONU-2G, and ONU-3G properties
type Omcc ¶
type Omcc struct { Extended bool // If true, extended messaging allowed, baseline otherwise // contains filtered or unexported fields }
Omcc is used to model the OMCI communications channel
func (*Omcc) OnMibReset ¶
func (*Omcc) RxOmci ¶
func (cc *Omcc) RxOmci(request *interfaces.OmciRequest) error
RxOmci is responsible for requesting Rx Processing and sending any response
func (*Omcc) TxAutonomousMessage ¶
func (cc *Omcc) TxAutonomousMessage(responseStream omci_pb.OMCI_OmciChannelServer, response *omci_pb.OmciResponse)
func (*Omcc) TxOmci ¶
func (cc *Omcc) TxOmci(responseStream omci_pb.OMCI_OmciChannelServer, response *omci_pb.OmciResponse)
type PMClock ¶
type PMClock struct { SupportsDate bool // 24-hour clock supported TrackingDate bool // Date & boundary set successfully IntervalEndTime uint8 // 15min interval end time counter // contains filtered or unexported fields }
PMClock provides 15-minute time interval support for the ONU. Note that the clock uses a Timer and not a Ticker. The initial tick interval for the clock will probably be less than 15 minutes, so a fixed interval Ticker did not seem to be the best choice.
func NewPMClock ¶
func (*PMClock) OnSynchronizeTimeRequest ¶
OnSynchronizeTimeRequest handles a new sync time request from the OLT and will reset/restart any PM intervals as necessary.
func (*PMClock) Subscribe ¶
func (p *PMClock) Subscribe(observer chan<- interface{})
Subscribe registers a channel to receive 15-min PM interval-end events.
The previous & current interval end time (uint8) is sent as the data on the channel
func (*PMClock) Unsubscribe ¶
func (p *PMClock) Unsubscribe(observer chan<- interface{})
Unsubscribe removes a channel from receiving any PM interval-end events
type PMTimerInterval ¶
type SlotPortModel ¶
SlotPort models the slots and ports of the ONU TODO: Create this from the Port Mapping packing MEs and use it to enforce
numbering contstraints. If MEs are not present in the MIB, be as lenient as is reasonable.
TODO: This is not yet integrated as generated ME support of the PortMapping ME
is not yet supported