[VOL-4396] OMCI lib update to be incorporated into ONU adapter, make use of relaxed decoding
Signed-off-by: mpagenko <michael.pagenkopf@adtran.com>
Change-Id: Ic8bc15ae061af8e27d73879f27bb5b80637a8dea
diff --git a/VERSION b/VERSION
index 4e7057f..dc2826d 100755
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.0.3-dev241
+2.0.3-dev242
diff --git a/go.mod b/go.mod
index a2c56f6..3a72b62 100644
--- a/go.mod
+++ b/go.mod
@@ -15,7 +15,7 @@
github.com/golang/protobuf v1.5.2
github.com/google/gopacket v1.1.17
github.com/looplab/fsm v0.2.0
- github.com/opencord/omci-lib-go v1.3.3
+ github.com/opencord/omci-lib-go/v2 v2.1.2
github.com/opencord/voltha-lib-go/v7 v7.0.4
github.com/opencord/voltha-protos/v5 v5.0.2
github.com/stretchr/testify v1.7.0
diff --git a/go.sum b/go.sum
index 4a0c1ea..eed06f0 100644
--- a/go.sum
+++ b/go.sum
@@ -191,8 +191,8 @@
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/onsi/gomega v1.14.0 h1:ep6kpPVwmr/nTbklSx2nrLNSIO62DoYAhnPNIMhK8gI=
github.com/onsi/gomega v1.14.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0=
-github.com/opencord/omci-lib-go v1.3.3 h1:BzywkXVHSphhpl9hHHOJxc9IQ7MrzIB3aY3LG1wbwuk=
-github.com/opencord/omci-lib-go v1.3.3/go.mod h1:moNk4j00XaM3olsu4a8lRAqGmcZJoyIbxtSr+VERLq4=
+github.com/opencord/omci-lib-go/v2 v2.1.2 h1:IgwSGEtM8zf/o8wrDLdY+q0WshDYwRwMGYeL35gMqVQ=
+github.com/opencord/omci-lib-go/v2 v2.1.2/go.mod h1:o1S/jhDLHNikFU7uG2TR5UOM5KmKlqwLlVncXi0FBYQ=
github.com/opencord/voltha-lib-go/v7 v7.0.4 h1:nVVRkEZyfEkGYewfgmO3NzIAIVdm8G/vVyEaCUwYW6g=
github.com/opencord/voltha-lib-go/v7 v7.0.4/go.mod h1:iZueJRS4XJ3rpm3iy0Zdnhz1lG5bWx2pZoPormwgUKk=
github.com/opencord/voltha-protos/v5 v5.0.0/go.mod h1:uVKXQB499Ir6G+rc47dSThNja1S4Vy3h9JLSDuJGmzI=
diff --git a/internal/pkg/almgr/alarm_manager.go b/internal/pkg/almgr/alarm_manager.go
index 91651fe..fa4bc9f 100755
--- a/internal/pkg/almgr/alarm_manager.go
+++ b/internal/pkg/almgr/alarm_manager.go
@@ -26,8 +26,8 @@
"time"
"github.com/looplab/fsm"
- "github.com/opencord/omci-lib-go"
- me "github.com/opencord/omci-lib-go/generated"
+ "github.com/opencord/omci-lib-go/v2"
+ me "github.com/opencord/omci-lib-go/v2/generated"
"github.com/opencord/voltha-lib-go/v7/pkg/events/eventif"
"github.com/opencord/voltha-lib-go/v7/pkg/log"
cmn "github.com/opencord/voltha-openonu-adapter-go/internal/pkg/common"
diff --git a/internal/pkg/avcfg/omci_ani_config.go b/internal/pkg/avcfg/omci_ani_config.go
index d4c8082..34ed185 100755
--- a/internal/pkg/avcfg/omci_ani_config.go
+++ b/internal/pkg/avcfg/omci_ani_config.go
@@ -28,8 +28,8 @@
"github.com/cevaris/ordered_map"
"github.com/looplab/fsm"
- "github.com/opencord/omci-lib-go"
- me "github.com/opencord/omci-lib-go/generated"
+ "github.com/opencord/omci-lib-go/v2"
+ me "github.com/opencord/omci-lib-go/v2/generated"
"github.com/opencord/voltha-lib-go/v7/pkg/log"
//ic "github.com/opencord/voltha-protos/v5/go/inter_container"
diff --git a/internal/pkg/avcfg/omci_vlan_config.go b/internal/pkg/avcfg/omci_vlan_config.go
index 7d6dcfe..5613306 100755
--- a/internal/pkg/avcfg/omci_vlan_config.go
+++ b/internal/pkg/avcfg/omci_vlan_config.go
@@ -32,8 +32,8 @@
gp "github.com/google/gopacket"
"github.com/looplab/fsm"
- "github.com/opencord/omci-lib-go"
- me "github.com/opencord/omci-lib-go/generated"
+ "github.com/opencord/omci-lib-go/v2"
+ me "github.com/opencord/omci-lib-go/v2/generated"
"github.com/opencord/voltha-lib-go/v7/pkg/log"
cmn "github.com/opencord/voltha-openonu-adapter-go/internal/pkg/common"
"github.com/opencord/voltha-openonu-adapter-go/internal/pkg/devdb"
diff --git a/internal/pkg/common/defines.go b/internal/pkg/common/defines.go
index d7ca0f5..270e6fe 100755
--- a/internal/pkg/common/defines.go
+++ b/internal/pkg/common/defines.go
@@ -23,7 +23,7 @@
gp "github.com/google/gopacket"
"github.com/looplab/fsm"
- "github.com/opencord/omci-lib-go"
+ "github.com/opencord/omci-lib-go/v2"
vc "github.com/opencord/voltha-protos/v5/go/common"
"github.com/opencord/voltha-protos/v5/go/voltha"
)
diff --git a/internal/pkg/common/omci_cc.go b/internal/pkg/common/omci_cc.go
index 9224d61..f591bc4 100755
--- a/internal/pkg/common/omci_cc.go
+++ b/internal/pkg/common/omci_cc.go
@@ -31,8 +31,9 @@
// TODO!!! Some references could be resolved auto, but some need specific context ....
gp "github.com/google/gopacket"
- "github.com/opencord/omci-lib-go"
- me "github.com/opencord/omci-lib-go/generated"
+ "github.com/opencord/omci-lib-go/v2"
+ me "github.com/opencord/omci-lib-go/v2/generated"
+ oframe "github.com/opencord/omci-lib-go/v2/meframe"
vgrpc "github.com/opencord/voltha-lib-go/v7/pkg/grpc"
@@ -332,6 +333,18 @@
oo.printRxMessage(ctx, rxMsg)
return fmt.Errorf("could not decode omci layer %s", oo.deviceID)
}
+ // insert some check on detected OMCI decoding issues and log them
+ // e.g. should indicate problems when detecting some unknown attribute mask content (independent from message type)
+ // even though allowed from omci-lib due to set relaxed decoding
+ // application may dig into further details if wanted/needed on their own [but info is not transferred from here so far]
+ // (compare mib_sync.go unknownAttrLayer)
+ errLayer := packet.Layer(gopacket.LayerTypeDecodeFailure)
+ if failure, decodeOk := errLayer.(*gopacket.DecodeFailure); decodeOk {
+ errMsg := failure.Error()
+ logger.Warnw(ctx, "Detected decode issue on received OMCI frame", log.Fields{
+ "device-id": oo.deviceID, "issue": errMsg})
+ }
+ //anyway try continue OMCI decoding further on message type layer
omciMsg, ok := omciLayer.(*omci.OMCI)
if !ok {
logger.Errorw(ctx, "omci-message could not assign omci layer", log.Fields{"device-id": oo.deviceID})
@@ -340,6 +353,7 @@
}
logger.Debugw(ctx, "omci-message-decoded:", log.Fields{"omciMsgType": omciMsg.MessageType,
"transCorrId": strconv.FormatInt(int64(omciMsg.TransactionID), 16), "DeviceIdent": omciMsg.DeviceIdentifier})
+
// TestResult is asynchronous indication that carries the same TID as the TestResponse.
// We expect to find the TID in the oo.rxSchedulerMap
if byte(omciMsg.MessageType)&me.AK == 0 && omciMsg.MessageType != omci.TestResultType {
@@ -885,7 +899,7 @@
meInstance, omciErr := me.NewGalEthernetProfile(meParams)
if omciErr.GetError() == nil {
//all setByCreate parameters already set, no default option required ...
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.CreateRequestType, omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.CreateRequestType, oframe.TransactionID(tid))
if err != nil {
logger.Errorw(ctx, "Cannot encode GalEnetProfileInstance for create", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -934,7 +948,7 @@
}
meInstance, omciErr := me.NewOnu2G(meParams)
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.SetRequestType, omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.SetRequestType, oframe.TransactionID(tid))
if err != nil {
logger.Errorw(ctx, "Cannot encode ONU2-G instance for set", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -988,8 +1002,8 @@
meInstance, omciErr := me.NewMacBridgeServiceProfile(meParams)
if omciErr.GetError() == nil {
//obviously we have to set all 'untouched' parameters to default by some additional option parameter!!
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.CreateRequestType,
- omci.TransactionID(tid), omci.AddDefaults(true))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.CreateRequestType,
+ oframe.TransactionID(tid), oframe.AddDefaults(true))
if err != nil {
logger.Errorw(ctx, "Cannot encode MBSP for create", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -1046,8 +1060,8 @@
meInstance, omciErr := me.NewMacBridgePortConfigurationData(meParams)
if omciErr.GetError() == nil {
//obviously we have to set all 'untouched' parameters to default by some additional option parameter!!
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.CreateRequestType,
- omci.TransactionID(tid), omci.AddDefaults(true))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.CreateRequestType,
+ oframe.TransactionID(tid), oframe.AddDefaults(true))
if err != nil {
logger.Errorw(ctx, "Cannot encode MBPCD for create", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -1100,12 +1114,14 @@
Attributes: me.AttributeValueMap{
"AssociationType": assType,
"AssociatedMePointer": aPUniPort.EntityID,
+ //EnhancedMode not yet supported, used with default options
},
}
meInstance, omciErr := me.NewExtendedVlanTaggingOperationConfigurationData(meParams)
if omciErr.GetError() == nil {
//all setByCreate parameters already set, no default option required ...
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.CreateRequestType, omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.CreateRequestType,
+ oframe.TransactionID(tid), oframe.AddDefaults(true))
if err != nil {
logger.Errorw(ctx, "Cannot encode EVTOCD for create", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -1151,7 +1167,7 @@
}
meInstance, omciErr := me.NewOnuG(meParams)
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.SetRequestType, omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.SetRequestType, oframe.TransactionID(tid))
if err != nil {
logger.Errorw(ctx, "Cannot encode ONU-G instance for set", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -1197,7 +1213,7 @@
}
meInstance, omciErr := me.NewPhysicalPathTerminationPointEthernetUni(meParams)
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.SetRequestType, omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.SetRequestType, oframe.TransactionID(tid))
if err != nil {
logger.Errorw(ctx, "Cannot encode PPTPEthUni instance for set", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -1244,7 +1260,7 @@
}
meInstance, omciErr := me.NewUniG(meParams)
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.SetRequestType, omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.SetRequestType, oframe.TransactionID(tid))
if err != nil {
logger.Errorw(ctx,"Cannot encode UNI-G instance for set", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -1291,7 +1307,7 @@
}
meInstance, omciErr := me.NewVirtualEthernetInterfacePoint(meParams)
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.SetRequestType, omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.SetRequestType, oframe.TransactionID(tid))
if err != nil {
logger.Errorw(ctx, "Cannot encode VEIP instance for set", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -1338,7 +1354,7 @@
meInstance, omciErr := me.LoadManagedEntityDefinition(classID, meParams)
if omciErr.GetError() == nil {
meClassIDName := meInstance.GetName()
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.GetRequestType, omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.GetRequestType, oframe.TransactionID(tid))
if err != nil {
logger.Errorf(ctx, "Cannot encode instance for get-request", log.Fields{"meClassIDName": meClassIDName, "Err": err, "device-id": oo.deviceID})
return nil, err
@@ -1423,8 +1439,8 @@
meInstance, omciErr := me.NewIeee8021PMapperServiceProfile(meParams)
if omciErr.GetError() == nil {
//we have to set all 'untouched' parameters to default by some additional option parameter!!
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.CreateRequestType,
- omci.TransactionID(tid), omci.AddDefaults(true))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.CreateRequestType,
+ oframe.TransactionID(tid), oframe.AddDefaults(true))
if err != nil {
logger.Errorw(ctx, "Cannot encode .1pMapper for create", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -1467,8 +1483,8 @@
meInstance, omciErr := me.NewMacBridgePortConfigurationData(params[0])
if omciErr.GetError() == nil {
//obviously we have to set all 'untouched' parameters to default by some additional option parameter!!
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.CreateRequestType,
- omci.TransactionID(tid), omci.AddDefaults(true))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.CreateRequestType,
+ oframe.TransactionID(tid), oframe.AddDefaults(true))
if err != nil {
logger.Errorw(ctx, "Cannot encode MBPCD for create", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -1511,8 +1527,8 @@
meInstance, omciErr := me.NewGemPortNetworkCtp(params[0])
if omciErr.GetError() == nil {
//obviously we have to set all 'untouched' parameters to default by some additional option parameter!!
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.CreateRequestType,
- omci.TransactionID(tid), omci.AddDefaults(true))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.CreateRequestType,
+ oframe.TransactionID(tid), oframe.AddDefaults(true))
if err != nil {
logger.Errorw(ctx, "Cannot encode GemNCTP for create", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -1554,8 +1570,8 @@
meInstance, omciErr := me.NewGemPortNetworkCtp(params[0])
if omciErr.GetError() == nil {
//obviously we have to set all 'untouched' parameters to default by some additional option parameter!!
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.SetRequestType,
- omci.TransactionID(tid), omci.AddDefaults(true))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.SetRequestType,
+ oframe.TransactionID(tid), oframe.AddDefaults(true))
if err != nil {
logger.Errorw(ctx, "Cannot encode GemNCTP for set", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -1598,8 +1614,8 @@
meInstance, omciErr := me.NewGemInterworkingTerminationPoint(params[0])
if omciErr.GetError() == nil {
//all SetByCreate Parameters (assumed to be) set here, for optimisation no 'AddDefaults'
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.CreateRequestType,
- omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.CreateRequestType,
+ oframe.TransactionID(tid))
if err != nil {
logger.Errorw(ctx, "Cannot encode GemIwTp for create", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -1641,7 +1657,7 @@
meInstance, omciErr := me.NewTCont(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.SetRequestType, omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.SetRequestType, oframe.TransactionID(tid))
if err != nil {
logger.Errorw(ctx, "Cannot encode TCont for set", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -1683,7 +1699,7 @@
meInstance, omciErr := me.NewPriorityQueue(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.SetRequestType, omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.SetRequestType, oframe.TransactionID(tid))
if err != nil {
logger.Errorw(ctx, "Cannot encode PrioQueue for set", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -1725,7 +1741,7 @@
meInstance, omciErr := me.NewIeee8021PMapperServiceProfile(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.SetRequestType, omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.SetRequestType, oframe.TransactionID(tid))
if err != nil {
logger.Errorw(ctx, "Cannot encode 1PMapper for set", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -1768,8 +1784,8 @@
meInstance, omciErr := me.NewVlanTaggingFilterData(params[0])
if omciErr.GetError() == nil {
//all SetByCreate Parameters (assumed to be) set here, for optimisation no 'AddDefaults'
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.CreateRequestType,
- omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.CreateRequestType,
+ oframe.TransactionID(tid))
if err != nil {
logger.Errorw(ctx, "Cannot encode VTFD for create", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -1814,8 +1830,8 @@
meInstance, omciErr := me.NewVlanTaggingFilterData(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.SetRequestType,
- omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.SetRequestType,
+ oframe.TransactionID(tid))
if err != nil {
logger.Errorw(ctx, "Cannot encode VTFD for set", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -1860,7 +1876,9 @@
meInstance, omciErr := me.NewExtendedVlanTaggingOperationConfigurationData(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.CreateRequestType, omci.TransactionID(tid))
+ //EnhancedMode not yet supported, used with default options
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.CreateRequestType,
+ oframe.TransactionID(tid), oframe.AddDefaults(true))
if err != nil {
logger.Errorw(ctx, "Cannot encode EVTOCD for create", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -1902,7 +1920,7 @@
meInstance, omciErr := me.NewExtendedVlanTaggingOperationConfigurationData(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.SetRequestType, omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.SetRequestType, oframe.TransactionID(tid))
if err != nil {
logger.Errorw(ctx, "Cannot encode EVTOCD for set", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -1944,7 +1962,7 @@
meInstance, omciErr := me.NewExtendedVlanTaggingOperationConfigurationData(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.DeleteRequestType, omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.DeleteRequestType, oframe.TransactionID(tid))
if err != nil {
logger.Errorw(ctx, "Cannot encode EVTOCD for delete", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -1987,8 +2005,8 @@
meParams := me.ParamData{EntityID: aInstID}
meInstance, omciErr := me.NewVlanTaggingFilterData(meParams)
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.DeleteRequestType,
- omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.DeleteRequestType,
+ oframe.TransactionID(tid))
if err != nil {
logger.Errorw(ctx, "Cannot encode VTFD for delete", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -2031,7 +2049,7 @@
"InstId": strconv.FormatInt(int64(params[0].EntityID), 16)})
meInstance, omciErr := me.NewTrafficDescriptor(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.CreateRequestType, omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.CreateRequestType, oframe.TransactionID(tid))
if err != nil {
logger.Errorw(ctx, "Cannot encode TD for create", log.Fields{"Err": err, "device-id": oo.deviceID})
return nil, err
@@ -2067,7 +2085,7 @@
meInstance, omciErr := me.NewTrafficDescriptor(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.SetRequestType, omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.SetRequestType, oframe.TransactionID(tid))
if err != nil {
logger.Errorw(ctx, "Cannot encode TD for set", log.Fields{"Err": err, "device-id": oo.deviceID})
return nil, err
@@ -2105,7 +2123,7 @@
meParams := me.ParamData{EntityID: aInstID}
meInstance, omciErr := me.NewTrafficDescriptor(meParams)
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.DeleteRequestType, omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.DeleteRequestType, oframe.TransactionID(tid))
if err != nil {
logger.Errorw(ctx, "Cannot encode TD for delete", log.Fields{"Err": err, "device-id": oo.deviceID})
return nil, err
@@ -2143,8 +2161,8 @@
meParams := me.ParamData{EntityID: aInstID}
meInstance, omciErr := me.NewGemInterworkingTerminationPoint(meParams)
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.DeleteRequestType,
- omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.DeleteRequestType,
+ oframe.TransactionID(tid))
if err != nil {
logger.Errorw(ctx, "Cannot encode GemIwTp for delete", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -2190,8 +2208,8 @@
meParams := me.ParamData{EntityID: aInstID}
meInstance, omciErr := me.NewGemPortNetworkCtp(meParams)
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.DeleteRequestType,
- omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.DeleteRequestType,
+ oframe.TransactionID(tid))
if err != nil {
logger.Errorw(ctx, "Cannot encode GemNCtp for delete", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -2237,8 +2255,8 @@
meParams := me.ParamData{EntityID: aInstID}
meInstance, omciErr := me.NewIeee8021PMapperServiceProfile(meParams)
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.DeleteRequestType,
- omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.DeleteRequestType,
+ oframe.TransactionID(tid))
if err != nil {
logger.Errorw(ctx, "Cannot encode .1pMapper for delete", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -2284,8 +2302,8 @@
meParams := me.ParamData{EntityID: aInstID}
meInstance, omciErr := me.NewMacBridgePortConfigurationData(meParams)
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.DeleteRequestType,
- omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.DeleteRequestType,
+ oframe.TransactionID(tid))
if err != nil {
logger.Errorw(ctx, "Cannot encode MBPCD for delete", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -2330,8 +2348,8 @@
meInstance, omciErr := me.NewMulticastGemInterworkingTerminationPoint(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.CreateRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.CreateRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
if err != nil {
logger.Errorw(ctx, "Cannot encode MulticastGEMIWTP for create", log.Fields{"Err": err, "device-id": oo.deviceID})
return nil, err
@@ -2369,8 +2387,8 @@
meInstance, omciErr := me.NewMulticastGemInterworkingTerminationPoint(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.SetRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.SetRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
if err != nil {
logger.Errorw(ctx, "Cannot encode MulticastGEMIWTP for set", log.Fields{"Err": err, "device-id": oo.deviceID})
return nil, err
@@ -2408,8 +2426,8 @@
meInstance, omciErr := me.NewMulticastOperationsProfile(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.CreateRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.CreateRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
if err != nil {
logger.Errorw(ctx, "Cannot encode MulticastOperationProfile for create", log.Fields{"Err": err,
"device-id": oo.deviceID})
@@ -2450,8 +2468,8 @@
meInstance, omciErr := me.NewMulticastOperationsProfile(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.SetRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.SetRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
if err != nil {
logger.Errorw(ctx, "Cannot encode MulticastOperationProfile for create", log.Fields{"Err": err,
"device-id": oo.deviceID})
@@ -2492,8 +2510,8 @@
meInstance, omciErr := me.NewMulticastSubscriberConfigInfo(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.CreateRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.CreateRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
if err != nil {
logger.Errorw(ctx, "Cannot encode MulticastSubConfigInfo for create", log.Fields{"Err": err,
"device-id": oo.deviceID})
@@ -2534,8 +2552,8 @@
meInstance, omciErr := me.NewVoipVoiceCtp(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.CreateRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.CreateRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
if err != nil {
logger.Errorw(ctx, "Cannot encode VoipVoiceCTP for create", log.Fields{"Err": err,
"device-id": oo.deviceID})
@@ -2576,8 +2594,8 @@
meInstance, omciErr := me.NewVoipVoiceCtp(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.SetRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.SetRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
if err != nil {
logger.Errorw(ctx, "Cannot encode VoipVoiceCTP for set", log.Fields{"Err": err,
"device-id": oo.deviceID})
@@ -2619,8 +2637,8 @@
meParams := me.ParamData{EntityID: aInstID}
meInstance, omciErr := me.NewVoipVoiceCtp(meParams)
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.DeleteRequestType,
- omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.DeleteRequestType,
+ oframe.TransactionID(tid))
if err != nil {
logger.Errorw(ctx, "Cannot encode VoipVoiceCTP for delete", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -2665,8 +2683,8 @@
meInstance, omciErr := me.NewVoipMediaProfile(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.CreateRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.CreateRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
if err != nil {
logger.Errorw(ctx, "Cannot encode VoipMediaProfile for create", log.Fields{"Err": err,
"device-id": oo.deviceID})
@@ -2707,8 +2725,8 @@
meInstance, omciErr := me.NewVoipMediaProfile(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.SetRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.SetRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
if err != nil {
logger.Errorw(ctx, "Cannot encode VoipMediaProfile for set", log.Fields{"Err": err,
"device-id": oo.deviceID})
@@ -2750,8 +2768,8 @@
meParams := me.ParamData{EntityID: aInstID}
meInstance, omciErr := me.NewVoipMediaProfile(meParams)
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.DeleteRequestType,
- omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.DeleteRequestType,
+ oframe.TransactionID(tid))
if err != nil {
logger.Errorw(ctx, "Cannot encode VoipMediaProfile for delete", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -2793,8 +2811,8 @@
meInstance, omciErr := me.NewVoiceServiceProfile(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.CreateRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.CreateRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
if err != nil {
logger.Errorw(ctx, "Cannot encode VoiceServiceProfile for create", log.Fields{"Err": err,
"device-id": oo.deviceID})
@@ -2835,8 +2853,8 @@
meInstance, omciErr := me.NewVoiceServiceProfile(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.SetRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.SetRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
if err != nil {
logger.Errorw(ctx, "Cannot encode VoiceServiceProfile for set", log.Fields{"Err": err,
"device-id": oo.deviceID})
@@ -2878,8 +2896,8 @@
meParams := me.ParamData{EntityID: aInstID}
meInstance, omciErr := me.NewVoiceServiceProfile(meParams)
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.DeleteRequestType,
- omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.DeleteRequestType,
+ oframe.TransactionID(tid))
if err != nil {
logger.Errorw(ctx, "Cannot encode VoiceServiceProfile for delete", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -2921,8 +2939,8 @@
meInstance, omciErr := me.NewSipUserData(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.CreateRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.CreateRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
if err != nil {
logger.Errorw(ctx, "Cannot encode SIPUserData for create", log.Fields{"Err": err,
"device-id": oo.deviceID})
@@ -2963,8 +2981,8 @@
meInstance, omciErr := me.NewSipUserData(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.SetRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.SetRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
if err != nil {
logger.Errorw(ctx, "Cannot encode SIPUserData for set", log.Fields{"Err": err,
"device-id": oo.deviceID})
@@ -3006,8 +3024,8 @@
meParams := me.ParamData{EntityID: aInstID}
meInstance, omciErr := me.NewSipUserData(meParams)
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.DeleteRequestType,
- omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.DeleteRequestType,
+ oframe.TransactionID(tid))
if err != nil {
logger.Errorw(ctx, "Cannot encode SIPUserData for delete", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -3049,8 +3067,8 @@
meInstance, omciErr := me.NewVoipApplicationServiceProfile(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.CreateRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.CreateRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
if err != nil {
logger.Errorw(ctx, "Cannot encode VoipApplicationServiceProfile for create", log.Fields{"Err": err,
"device-id": oo.deviceID})
@@ -3091,8 +3109,8 @@
meInstance, omciErr := me.NewVoipApplicationServiceProfile(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.SetRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.SetRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
if err != nil {
logger.Errorw(ctx, "Cannot encode VoipApplicationServiceProfile for set", log.Fields{"Err": err,
"device-id": oo.deviceID})
@@ -3134,8 +3152,8 @@
meParams := me.ParamData{EntityID: aInstID}
meInstance, omciErr := me.NewVoipApplicationServiceProfile(meParams)
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.DeleteRequestType,
- omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.DeleteRequestType,
+ oframe.TransactionID(tid))
if err != nil {
logger.Errorw(ctx, "Cannot encode SIPVoipApplicationServiceProfile for delete", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -3177,8 +3195,8 @@
meInstance, omciErr := me.NewSipAgentConfigData(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.CreateRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.CreateRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
if err != nil {
logger.Errorw(ctx, "Cannot encode SIPAgentConfigData for create", log.Fields{"Err": err,
"device-id": oo.deviceID})
@@ -3219,8 +3237,8 @@
meInstance, omciErr := me.NewSipAgentConfigData(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.SetRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.SetRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
if err != nil {
logger.Errorw(ctx, "Cannot encode SIPAgentConfigData for set", log.Fields{"Err": err,
"device-id": oo.deviceID})
@@ -3262,8 +3280,8 @@
meParams := me.ParamData{EntityID: aInstID}
meInstance, omciErr := me.NewSipAgentConfigData(meParams)
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.DeleteRequestType,
- omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.DeleteRequestType,
+ oframe.TransactionID(tid))
if err != nil {
logger.Errorw(ctx, "Cannot encode SIPAgentConfigData for delete", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -3305,8 +3323,8 @@
meInstance, omciErr := me.NewTcpUdpConfigData(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.CreateRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.CreateRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
if err != nil {
logger.Errorw(ctx, "Cannot encode TCPUDPConfigData for create", log.Fields{"Err": err,
"device-id": oo.deviceID})
@@ -3347,8 +3365,8 @@
meInstance, omciErr := me.NewTcpUdpConfigData(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.SetRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.SetRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
if err != nil {
logger.Errorw(ctx, "Cannot encode TCPUDPConfigData for set", log.Fields{"Err": err,
"device-id": oo.deviceID})
@@ -3390,8 +3408,8 @@
meParams := me.ParamData{EntityID: aInstID}
meInstance, omciErr := me.NewTcpUdpConfigData(meParams)
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.DeleteRequestType,
- omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.DeleteRequestType,
+ oframe.TransactionID(tid))
if err != nil {
logger.Errorw(ctx, "Cannot encode TCPUDPConfigData for delete", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -3433,8 +3451,8 @@
meInstance, omciErr := me.NewIpHostConfigData(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.CreateRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.CreateRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
if err != nil {
logger.Errorw(ctx, "Cannot encode IPHostConfigData for create", log.Fields{"Err": err,
"device-id": oo.deviceID})
@@ -3475,8 +3493,8 @@
meInstance, omciErr := me.NewIpHostConfigData(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.SetRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.SetRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
if err != nil {
logger.Errorw(ctx, "Cannot encode IPHostConfigData for set", log.Fields{"Err": err,
"device-id": oo.deviceID})
@@ -3518,8 +3536,8 @@
meParams := me.ParamData{EntityID: aInstID}
meInstance, omciErr := me.NewIpHostConfigData(meParams)
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.DeleteRequestType,
- omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.DeleteRequestType,
+ oframe.TransactionID(tid))
if err != nil {
logger.Errorw(ctx, "Cannot encode IPHostConfigData for delete", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -3561,8 +3579,8 @@
meInstance, omciErr := me.NewRtpProfileData(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.CreateRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.CreateRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
if err != nil {
logger.Errorw(ctx, "Cannot encode RTPProfileData for create", log.Fields{"Err": err,
"device-id": oo.deviceID})
@@ -3603,8 +3621,8 @@
meInstance, omciErr := me.NewRtpProfileData(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.SetRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.SetRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
if err != nil {
logger.Errorw(ctx, "Cannot encode RTPProfileData for set", log.Fields{"Err": err,
"device-id": oo.deviceID})
@@ -3646,8 +3664,8 @@
meParams := me.ParamData{EntityID: aInstID}
meInstance, omciErr := me.NewRtpProfileData(meParams)
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.DeleteRequestType,
- omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.DeleteRequestType,
+ oframe.TransactionID(tid))
if err != nil {
logger.Errorw(ctx, "Cannot encode RTPProfileData for delete", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -3689,8 +3707,8 @@
meInstance, omciErr := me.NewNetworkDialPlanTable(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.CreateRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.CreateRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
if err != nil {
logger.Errorw(ctx, "Cannot encode NetworkDialPlanTable for create", log.Fields{"Err": err,
"device-id": oo.deviceID})
@@ -3731,8 +3749,8 @@
meInstance, omciErr := me.NewNetworkDialPlanTable(params[0])
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.SetRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.SetRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
if err != nil {
logger.Errorw(ctx, "Cannot encode NetworkDialPlanTable for set", log.Fields{"Err": err,
"device-id": oo.deviceID})
@@ -3774,8 +3792,8 @@
meParams := me.ParamData{EntityID: aInstID}
meInstance, omciErr := me.NewNetworkDialPlanTable(meParams)
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.DeleteRequestType,
- omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.DeleteRequestType,
+ oframe.TransactionID(tid))
if err != nil {
logger.Errorw(ctx, "Cannot encode NetworkDialPlanTable for delete", log.Fields{
"Err": err, "device-id": oo.deviceID})
@@ -3872,11 +3890,11 @@
var msgLayer gopacket.SerializableLayer
var err error
if create {
- omciLayer, msgLayer, err = omci.EncodeFrame(meInstance, omci.CreateRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err = oframe.EncodeFrame(meInstance, omci.CreateRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
} else {
- omciLayer, msgLayer, err = omci.EncodeFrame(meInstance, omci.DeleteRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err = oframe.EncodeFrame(meInstance, omci.DeleteRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
}
if err != nil {
logger.Errorw(ctx, "Cannot encode ethernet frame performance monitoring history data ME",
@@ -3925,11 +3943,11 @@
var msgLayer gopacket.SerializableLayer
var err error
if create {
- omciLayer, msgLayer, err = omci.EncodeFrame(meInstance, omci.CreateRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err = oframe.EncodeFrame(meInstance, omci.CreateRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
} else {
- omciLayer, msgLayer, err = omci.EncodeFrame(meInstance, omci.DeleteRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err = oframe.EncodeFrame(meInstance, omci.DeleteRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
}
if err != nil {
logger.Errorw(ctx, "Cannot encode ethernet uni history data ME",
@@ -3978,11 +3996,11 @@
var msgLayer gopacket.SerializableLayer
var err error
if create {
- omciLayer, msgLayer, err = omci.EncodeFrame(meInstance, omci.CreateRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err = oframe.EncodeFrame(meInstance, omci.CreateRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
} else {
- omciLayer, msgLayer, err = omci.EncodeFrame(meInstance, omci.DeleteRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err = oframe.EncodeFrame(meInstance, omci.DeleteRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
}
if err != nil {
logger.Errorw(ctx, "Cannot encode fec history data ME",
@@ -4031,11 +4049,11 @@
var msgLayer gopacket.SerializableLayer
var err error
if create {
- omciLayer, msgLayer, err = omci.EncodeFrame(meInstance, omci.CreateRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err = oframe.EncodeFrame(meInstance, omci.CreateRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
} else {
- omciLayer, msgLayer, err = omci.EncodeFrame(meInstance, omci.DeleteRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err = oframe.EncodeFrame(meInstance, omci.DeleteRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
}
if err != nil {
logger.Errorw(ctx, "Cannot encode gemport history data ME",
@@ -4552,11 +4570,11 @@
var msgLayer gopacket.SerializableLayer
var err error
if create {
- omciLayer, msgLayer, err = omci.EncodeFrame(meInstance, omci.CreateRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err = oframe.EncodeFrame(meInstance, omci.CreateRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
} else {
- omciLayer, msgLayer, err = omci.EncodeFrame(meInstance, omci.DeleteRequestType, omci.TransactionID(tid),
- omci.AddDefaults(true))
+ omciLayer, msgLayer, err = oframe.EncodeFrame(meInstance, omci.DeleteRequestType, oframe.TransactionID(tid),
+ oframe.AddDefaults(true))
}
if err != nil {
logger.Errorw(ctx, "cannot-encode-ethernet-frame-extended-pm-me",
@@ -4629,7 +4647,7 @@
}
if omciErr.GetError() == nil {
- omciLayer, msgLayer, err := omci.EncodeFrame(meInstance, omci.SetRequestType, omci.TransactionID(tid))
+ omciLayer, msgLayer, err := oframe.EncodeFrame(meInstance, omci.SetRequestType, oframe.TransactionID(tid))
if err != nil {
logger.Errorw(ctx, "cannot-encode-ethernet-frame-extended-pm-me",
log.Fields{"err": err, "device-id": oo.deviceID, "inst-id": strconv.FormatInt(int64(entityID), 16)})
diff --git a/internal/pkg/common/utils.go b/internal/pkg/common/utils.go
index 6e28976..e8a161c 100755
--- a/internal/pkg/common/utils.go
+++ b/internal/pkg/common/utils.go
@@ -29,7 +29,7 @@
"strings"
"github.com/looplab/fsm"
- me "github.com/opencord/omci-lib-go/generated"
+ me "github.com/opencord/omci-lib-go/v2/generated"
"github.com/opencord/voltha-lib-go/v7/pkg/log"
)
diff --git a/internal/pkg/core/device_handler.go b/internal/pkg/core/device_handler.go
index f2cd542..f875553 100755
--- a/internal/pkg/core/device_handler.go
+++ b/internal/pkg/core/device_handler.go
@@ -29,7 +29,7 @@
"github.com/gogo/protobuf/proto"
"github.com/looplab/fsm"
- me "github.com/opencord/omci-lib-go/generated"
+ me "github.com/opencord/omci-lib-go/v2/generated"
"github.com/opencord/voltha-lib-go/v7/pkg/db"
"github.com/opencord/voltha-lib-go/v7/pkg/events/eventif"
flow "github.com/opencord/voltha-lib-go/v7/pkg/flows"
diff --git a/internal/pkg/devdb/onu_device_db.go b/internal/pkg/devdb/onu_device_db.go
index 1bee2ec..008c37c 100755
--- a/internal/pkg/devdb/onu_device_db.go
+++ b/internal/pkg/devdb/onu_device_db.go
@@ -24,7 +24,7 @@
"sort"
"sync"
- me "github.com/opencord/omci-lib-go/generated"
+ me "github.com/opencord/omci-lib-go/v2/generated"
"github.com/opencord/voltha-lib-go/v7/pkg/log"
)
diff --git a/internal/pkg/mib/mib_download.go b/internal/pkg/mib/mib_download.go
index 9c49f9b..691ec1b 100755
--- a/internal/pkg/mib/mib_download.go
+++ b/internal/pkg/mib/mib_download.go
@@ -24,8 +24,8 @@
"github.com/looplab/fsm"
- "github.com/opencord/omci-lib-go"
- me "github.com/opencord/omci-lib-go/generated"
+ "github.com/opencord/omci-lib-go/v2"
+ me "github.com/opencord/omci-lib-go/v2/generated"
"github.com/opencord/voltha-lib-go/v7/pkg/log"
//ic "github.com/opencord/voltha-protos/v5/go/inter_container"
//"github.com/opencord/voltha-protos/v5/go/openflow_13"
diff --git a/internal/pkg/mib/mib_sync.go b/internal/pkg/mib/mib_sync.go
index a26422d..d3b3543 100755
--- a/internal/pkg/mib/mib_sync.go
+++ b/internal/pkg/mib/mib_sync.go
@@ -30,8 +30,8 @@
"time"
- "github.com/opencord/omci-lib-go"
- me "github.com/opencord/omci-lib-go/generated"
+ "github.com/opencord/omci-lib-go/v2"
+ me "github.com/opencord/omci-lib-go/v2/generated"
"github.com/opencord/voltha-lib-go/v7/pkg/db/kvstore"
"github.com/opencord/voltha-lib-go/v7/pkg/log"
cmn "github.com/opencord/voltha-openonu-adapter-go/internal/pkg/common"
@@ -551,6 +551,28 @@
meClassID := msgObj.ReportedME.GetClassID()
meEntityID := msgObj.ReportedME.GetEntityID()
meAttributes := msgObj.ReportedME.GetAttributeValueMap()
+
+ //with relaxed decoding set in the OMCI-LIB we have the chance to detect if there are some unknown attributes appended which we cannot decode
+ if unknownAttrLayer := (*msg.OmciPacket).Layer(omci.LayerTypeUnknownAttributes); unknownAttrLayer != nil {
+ logger.Warnw(ctx, "MibUploadNextResponse contains unknown attributes", log.Fields{"device-id": oo.deviceID})
+ if unknownAttributes, ok := unknownAttrLayer.(*omci.UnknownAttributes); ok {
+ // provide a loop over several ME's here already in preparation of OMCI extended message format
+ for _, unknown := range unknownAttributes.Attributes {
+ unknownAttrClassID := unknown.EntityClass // ClassID
+ unknownAttrInst := unknown.EntityInstance // uint16
+ unknownAttrMask := unknown.AttributeMask // ui
+ unknownAttrBlob := unknown.AttributeData // []byte
+ logger.Warnw(ctx, "unknown attributes detected for", log.Fields{"device-id": oo.deviceID,
+ "Me-ClassId": unknownAttrClassID, "Me-InstId": unknownAttrInst, "unknown mask": unknownAttrMask,
+ "unknown attributes": unknownAttrBlob})
+ //TODO!!! We have to find a way to put this extra information into the (MIB)DB, see below pOnuDB.PutMe
+ // this probably requires an (add-on) extension in the DB, that should not harm any other (get) processing -> later as a second step
+ } // for all included ME's with unknown attributes
+ } else {
+ logger.Errorw(ctx, "unknownAttrLayer could not be decoded", log.Fields{"device-id": oo.deviceID})
+ }
+ }
+
oo.pOnuDB.PutMe(ctx, meClassID, meEntityID, meAttributes)
}
if oo.PDevOmciCC.UploadSequNo < oo.PDevOmciCC.UploadNoOfCmds {
diff --git a/internal/pkg/mib/onu_device_entry.go b/internal/pkg/mib/onu_device_entry.go
index ebf8de8..c35377f 100755
--- a/internal/pkg/mib/onu_device_entry.go
+++ b/internal/pkg/mib/onu_device_entry.go
@@ -26,8 +26,8 @@
"time"
"github.com/looplab/fsm"
- "github.com/opencord/omci-lib-go"
- me "github.com/opencord/omci-lib-go/generated"
+ "github.com/opencord/omci-lib-go/v2"
+ me "github.com/opencord/omci-lib-go/v2/generated"
"github.com/opencord/voltha-lib-go/v7/pkg/db"
"github.com/opencord/voltha-lib-go/v7/pkg/db/kvstore"
vgrpc "github.com/opencord/voltha-lib-go/v7/pkg/grpc"
diff --git a/internal/pkg/omcitst/omci_self_test_handler.go b/internal/pkg/omcitst/omci_self_test_handler.go
index 5809228..93b32ce 100755
--- a/internal/pkg/omcitst/omci_self_test_handler.go
+++ b/internal/pkg/omcitst/omci_self_test_handler.go
@@ -24,9 +24,9 @@
"time"
"github.com/looplab/fsm"
- "github.com/opencord/omci-lib-go"
- "github.com/opencord/omci-lib-go/generated"
- me "github.com/opencord/omci-lib-go/generated"
+ "github.com/opencord/omci-lib-go/v2"
+ "github.com/opencord/omci-lib-go/v2/generated"
+ me "github.com/opencord/omci-lib-go/v2/generated"
"github.com/opencord/voltha-lib-go/v7/pkg/log"
cmn "github.com/opencord/voltha-openonu-adapter-go/internal/pkg/common"
"github.com/opencord/voltha-protos/v5/go/extension"
diff --git a/internal/pkg/omcitst/omci_test_request.go b/internal/pkg/omcitst/omci_test_request.go
index 33db828..9f802a4 100755
--- a/internal/pkg/omcitst/omci_test_request.go
+++ b/internal/pkg/omcitst/omci_test_request.go
@@ -22,8 +22,8 @@
"fmt"
gp "github.com/google/gopacket"
- "github.com/opencord/omci-lib-go"
- me "github.com/opencord/omci-lib-go/generated"
+ "github.com/opencord/omci-lib-go/v2"
+ me "github.com/opencord/omci-lib-go/v2/generated"
cmn "github.com/opencord/voltha-openonu-adapter-go/internal/pkg/common"
"github.com/opencord/voltha-lib-go/v7/pkg/log"
diff --git a/internal/pkg/pmmgr/onu_metrics_manager.go b/internal/pkg/pmmgr/onu_metrics_manager.go
index ce258de..a71beed 100755
--- a/internal/pkg/pmmgr/onu_metrics_manager.go
+++ b/internal/pkg/pmmgr/onu_metrics_manager.go
@@ -26,8 +26,8 @@
"time"
"github.com/looplab/fsm"
- "github.com/opencord/omci-lib-go"
- me "github.com/opencord/omci-lib-go/generated"
+ "github.com/opencord/omci-lib-go/v2"
+ me "github.com/opencord/omci-lib-go/v2/generated"
"github.com/opencord/voltha-lib-go/v7/pkg/db"
"github.com/opencord/voltha-lib-go/v7/pkg/db/kvstore"
"github.com/opencord/voltha-lib-go/v7/pkg/log"
diff --git a/internal/pkg/swupg/omci_onu_upgrade.go b/internal/pkg/swupg/omci_onu_upgrade.go
index 668e7b1..140c6f9 100755
--- a/internal/pkg/swupg/omci_onu_upgrade.go
+++ b/internal/pkg/swupg/omci_onu_upgrade.go
@@ -27,8 +27,8 @@
"github.com/boguslaw-wojcik/crc32a"
"github.com/looplab/fsm"
- "github.com/opencord/omci-lib-go"
- me "github.com/opencord/omci-lib-go/generated"
+ "github.com/opencord/omci-lib-go/v2"
+ me "github.com/opencord/omci-lib-go/v2/generated"
"github.com/opencord/voltha-lib-go/v7/pkg/log"
cmn "github.com/opencord/voltha-openonu-adapter-go/internal/pkg/common"
"github.com/opencord/voltha-openonu-adapter-go/internal/pkg/devdb"
diff --git a/internal/pkg/swupg/onu_image_status.go b/internal/pkg/swupg/onu_image_status.go
index 4e1215f..bb2d820 100755
--- a/internal/pkg/swupg/onu_image_status.go
+++ b/internal/pkg/swupg/onu_image_status.go
@@ -24,8 +24,8 @@
"sync"
"time"
- "github.com/opencord/omci-lib-go"
- me "github.com/opencord/omci-lib-go/generated"
+ "github.com/opencord/omci-lib-go/v2"
+ me "github.com/opencord/omci-lib-go/v2/generated"
"github.com/opencord/voltha-lib-go/v7/pkg/log"
cmn "github.com/opencord/voltha-openonu-adapter-go/internal/pkg/common"
"github.com/opencord/voltha-protos/v5/go/voltha"
diff --git a/internal/pkg/uniprt/uniportadmin.go b/internal/pkg/uniprt/uniportadmin.go
index 60f210e..0706fba 100755
--- a/internal/pkg/uniprt/uniportadmin.go
+++ b/internal/pkg/uniprt/uniportadmin.go
@@ -25,8 +25,8 @@
"github.com/looplab/fsm"
- "github.com/opencord/omci-lib-go"
- me "github.com/opencord/omci-lib-go/generated"
+ "github.com/opencord/omci-lib-go/v2"
+ me "github.com/opencord/omci-lib-go/v2/generated"
"github.com/opencord/voltha-lib-go/v7/pkg/log"
cmn "github.com/opencord/voltha-openonu-adapter-go/internal/pkg/common"
)
diff --git a/internal/pkg/uniprt/uniportstatus.go b/internal/pkg/uniprt/uniportstatus.go
index 8f8dedd..b088d41 100755
--- a/internal/pkg/uniprt/uniportstatus.go
+++ b/internal/pkg/uniprt/uniportstatus.go
@@ -21,8 +21,8 @@
"context"
"time"
- "github.com/opencord/omci-lib-go"
- me "github.com/opencord/omci-lib-go/generated"
+ "github.com/opencord/omci-lib-go/v2"
+ me "github.com/opencord/omci-lib-go/v2/generated"
"github.com/opencord/voltha-lib-go/v7/pkg/log"
cmn "github.com/opencord/voltha-openonu-adapter-go/internal/pkg/common"
"github.com/opencord/voltha-protos/v5/go/extension"
diff --git a/vendor/github.com/opencord/omci-lib-go/README.md b/vendor/github.com/opencord/omci-lib-go/README.md
deleted file mode 100644
index a2aa972..0000000
--- a/vendor/github.com/opencord/omci-lib-go/README.md
+++ /dev/null
@@ -1,162 +0,0 @@
-# OMCI
-
-OMCI gopacket library supports the encoding and decoding of ITU G.988 OMCI
-messages. Support for the Baseline Message Set has been completed and work
-is underway to support the Extended Message Set format.
-
-## Message Types supported and under unit test
-The following OMCI message types currently have been coded and are covered
-satisfactory by unit tests.
-
- - CreateRequest
- - CreateResponse
- - DeleteRequest
- - DeleteResponse
- - SetRequest
- - GetRequest
- - GetAllAlarmsRequest
- - GetAllAlarmsResponse
- - GetAllAlarmsNextRequest
- - MibUploadRequest
- - MibUploadResponse
- - MibUploadNextRequest
- - MibResetRequest
- - MibResetResponse
- - SynchronizeTimeRequest
- - DownloadSectionRequest
- - DownloadSectionResponse
- - EndSoftwareDownloadRequest
- - EndSoftwareDownloadResponse
- - CommitSoftwareRequest
- - CommitSoftwareResponse
- - AlarmNotification
-
-## Message Types supported but lacking full unit test
-The following OMCI message types currently have been coded and are partially covered
-by unit tests, but work still remains for sufficient/better unit test coverage.
-
- - SetResponse
- - GetResponse
- - GetAllAlarmsNextResponse
- - MibUploadNextResponse
- - SynchronizeTimeResponse
- - AttributeValueChange
- - RebootRequest
- - RebootResponse
- - StartSoftwareDownloadRequest
- - GetNextRequest
- - GetNextResponse
- - TestResult
- - TestRequest
- - TestResponse
- - GetCurrentDataRequest
- - GetCurrentDataResponse
-
-## Message Types supported but lacking any unit test
-The following OMCI message types currently have been coded but do not
-have any unit test coverage.
-
- - StartSoftwareDownloadResponse
- - ActivateSoftwareRequest
- - ActivateSoftwareResponse
-
-## Message Types not yet supported
-
-The following OMCI message types currently have not been coded.
-
- - SetTableRequest
- - SetTableResponse
-
-## Extended Message Set Support
-
-As mentioned earlier, support for the Extended Message Set is underway. Currently,
-the following Message Types have this support and are covered by unit tests:
-
- - GetRequest
- - GetResponse
- - DownloadSectionRequest/Response
- - AlarmNotification
- - AttributeValueChange
- - TestResult
-
-### Upcoming message types that will be supported
-
-The following provides a list of message types that will eventually support the _Extended Message Set_
-in the expected order of implementation. The priority was chosen based on speed improvement requests
-of operations and ease of implementation.
-
- - GetCurrentDataRequest/Response
- - MibResetRequest/Response
- - RebootRequest/Response
- - SynchronizeTimeRequest/Response
- - CreateRequest/Response
- - DeleteRequest/Response
- - SetRequest/Response
-
- - GetNextRequest/Response
- - SetTableRequest/Response
-
- - MibUploadRequest/Response
- - MibUploadNextRequest/Response
-
- - GetAllAlarmsRequest/Response
- - GetAllAlarmsNextRequest/Response
-
- - StartSoftwareDownloadRequest/Response
- - EndSoftwareDownloadRequest/Response
- - CommitSoftwareRequest/Response
- - ActivateSoftwareRequest/Response
-
- - TestRequest/Response
-
-## Current user-test coverage
-
-The _**make** test_ command can be used to create code coverage support for the
-library. The current coverage for version 1.0.0 (as of 4/21/2021) is:
-
-| File | Statement Coverage |
-| --------------: | :---: |
-| layers.go | 100% |
-| mebase.go | 91.7% |
-| meframe.go | 50.8% |
-| messagetypes.go | 59.1% |
-| omci.go | 79.0% |
-
-## Other outstanding items
-
-Besides OMCI Message decode/serialization, and associated unit tests, the following items
-would be needed or useful in a first official release of this library. Some changes are
-to be done in the generated OMCI ME code as well.
-
- - Constraint checking (these are not yet fully parsed/provided by the OMCI code generated
- structs). This feature will hopefully be available in the near future.
- - Add AVC flag for appropriate attributes
- - Add some type of logging support
-
-Also searching through the code for _TODO_ statements will also yield additional areas of
-work to be performed.
-
-## What is not provided by this library
-
-This library is not a full OMCI stack for either an OLT or an ONU. It is focused primarily on
-packet decode/serialization and a variety of structs and functions that are useful for handling
-the creation of OMCI frames and handling decoded frames from the PON.
-
-For an OLT-side OMCI stack, you would still need to write:
- - OMCI CC sender & receiver (stop & wait protocol) with appropriate timeout support
- - OLT State machines to support
- - MIB Uploads/Audits/Resynchronization (and a MIB database implemention),
- - More sophisticated get & get-next support to make handle of MEs with
- lots of attributes or table attributes easy to handle and code,
- - Alarm Table support,
- - OMCI ME/Msg-Type capabilities inquiry,
- - Performance Monitoring collection (and initial time synchronization),
- - Service implementation
-
-For an ONU-side OMCI stack, you would still need to write:
- - OMCC implementation,
- - MIB Database,
- - Get-Next cache for table attributes,
- - MIB upload next cache for MIB uploads,
- - Generation of any alarms/AVC notifications,
- - Actually acting on the create/delete/get/set/... requests from an OLT
\ No newline at end of file
diff --git a/vendor/github.com/opencord/omci-lib-go/VERSION b/vendor/github.com/opencord/omci-lib-go/VERSION
deleted file mode 100644
index 31e5c84..0000000
--- a/vendor/github.com/opencord/omci-lib-go/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-1.3.3
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/ani-g.go b/vendor/github.com/opencord/omci-lib-go/generated/ani-g.go
deleted file mode 100644
index 022fcbf..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/ani-g.go
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// AniGClassID is the 16-bit ID for the OMCI
-// Managed entity ANI-G
-const AniGClassID ClassID = ClassID(263)
-
-var anigBME *ManagedEntityDefinition
-
-// AniG (class ID #263)
-// This ME organizes data associated with each access network interface supported by a GPON ONU.
-// The ONU automatically creates one instance of this ME for each PON physical port.
-//
-// Relationships
-// An instance of this ME is associated with each instance of a physical PON interface.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. Its value
-// indicates the physical position of the PON interface. The first byte is the slot ID, defined in
-// clause 9.1.5. The second byte is the port ID. (R) (mandatory) (2-bytes)
-//
-// Sr Indication
-// SR indication: This Boolean attribute indicates the ONU's capability to report queue status for
-// DBA. The value true means that status reporting is available for all TCONTs that are associated
-// with the ANI. (R) (mandatory) (1-byte)
-//
-// Total TCont Number
-// Total TCONT number: This attribute indicates the total number of T-CONTs that can be supported
-// on this ANI. (R) (mandatory) (2-bytes)
-//
-// Gem Block Length
-// In all other ITU-T PON systems, the unit for queue occupancy reporting is fixed in at 4-bytes by
-// the respective TC layer specification.
-//
-// Piggyback Dba Reporting
-// (R) (mandatory) (1-byte)
-//
-// Deprecated
-// Deprecated: This attribute should be set to 0 by the ONU and ignored by the OLT. (R) (mandatory)
-// (1-byte)
-//
-// Signal Fail Threshold
-// Signal fail (SF) threshold: This attribute specifies the downstream bit error rate (BER)
-// threshold to detect the SF alarm. When this value is y, the BER threshold is 10-y. Valid values
-// are 3..8. Upon ME instantiation, the ONU sets this attribute to 5. (R,-W) (mandatory) (1-byte)
-//
-// Signal Degrade Threshold
-// Signal degrade (SD) threshold: This attribute specifies the downstream BER threshold to detect
-// the SD alarm. When this value is x, the BER threshold for SD is 10-x. Valid values are 4..10.
-// The SD threshold must be lower than the SF threshold; i.e., x-> y. Upon ME instantiation, the
-// ONU sets this attribute to 9. (R,-W) (mandatory) (1-byte)
-//
-// Arc
-// ARC: See clause A.1.4.3. (R,-W) (optional) (1-byte)
-//
-// Arc Interval
-// ARC interval: See clause A.1.4.3. (R,-W) (optional) (1-byte)
-//
-// Optical Signal Level
-// Optical signal level: This attribute reports the current measurement of the total downstream
-// optical signal level. Its value is a 2s complement integer referred to 1- mW (i.e., 1-dBm), with
-// 0.002 dB granularity. (R) (optional) (2-bytes)
-//
-// Lower Optical Threshold
-// Lower optical threshold: This attribute specifies the optical level the ONU uses to declare the
-// downstream low received optical power alarm. Valid values are -127 dBm (coded as 254) to 0 dBm
-// (coded as 0) in 0.5 dB increments. The default value 0xFF selects the ONU's internal policy.
-// (R,-W) (optional) (1-byte)
-//
-// Upper Optical Threshold
-// Upper optical threshold: This attribute specifies the optical level the ONU uses to declare the
-// downstream high received optical power alarm. Valid values are -127 dBm (coded as 254) to 0 dBm
-// (coded as 0) in 0.5 dB increments. The default value 0xFF selects the ONU's internal policy.
-// (R,-W) (optional) (1-byte)
-//
-// Onu Response Time
-// (R) (optional) (2-bytes)
-//
-// Transmit Optical Level
-// Transmit optical level: This attribute reports the current measurement of mean optical launch
-// power. Its value is a 2s complement integer referred to 1-mW (i.e., 1-dBm), with 0.002 dB
-// granularity. (R) (optional) (2-bytes)
-//
-// Lower Transmit Power Threshold
-// Lower transmit power threshold: This attribute specifies the minimum mean optical launch power
-// that the ONU uses to declare the low transmit optical power alarm. Its value is a 2s complement
-// integer referred to 1-mW (i.e., dBm), with 0.5-dB granularity. The default value -63.5 (0x81)
-// selects the ONU's internal policy. (R,-W) (optional) (1-byte)
-//
-// Upper Transmit Power Threshold
-// Upper transmit power threshold: This attribute specifies the maximum mean optical launch power
-// that the ONU uses to declare the high transmit optical power alarm. Its value is a 2s complement
-// integer referred to 1-mW (i.e., dBm), with 0.5-dB granularity. The default value -63.5 (0x81)
-// selects the ONU's internal policy. (R,-W) (optional) (1-byte)
-//
-type AniG struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- anigBME = &ManagedEntityDefinition{
- Name: "AniG",
- ClassID: 263,
- MessageTypes: mapset.NewSetWith(
- Get,
- Set,
- Test,
- ),
- AllowedAttributeMask: 0xffff,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
- 1: ByteField("SrIndication", EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
- 2: Uint16Field("TotalTcontNumber", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
- 3: Uint16Field("GemBlockLength", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3),
- 4: ByteField("PiggybackDbaReporting", EnumerationAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
- 5: ByteField("Deprecated", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, true, 5),
- 6: ByteField("SignalFailThreshold", UnsignedIntegerAttributeType, 0x0400, 5, mapset.NewSetWith(Read, Write), false, false, false, 6),
- 7: ByteField("SignalDegradeThreshold", UnsignedIntegerAttributeType, 0x0200, 9, mapset.NewSetWith(Read, Write), false, false, false, 7),
- 8: ByteField("Arc", EnumerationAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), true, true, false, 8),
- 9: ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9),
- 10: Uint16Field("OpticalSignalLevel", SignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, true, false, 10),
- 11: ByteField("LowerOpticalThreshold", SignedIntegerAttributeType, 0x0020, 255, mapset.NewSetWith(Read, Write), false, true, false, 11),
- 12: ByteField("UpperOpticalThreshold", SignedIntegerAttributeType, 0x0010, 255, mapset.NewSetWith(Read, Write), false, true, false, 12),
- 13: Uint16Field("OnuResponseTime", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, true, false, 13),
- 14: Uint16Field("TransmitOpticalLevel", SignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, true, false, 14),
- 15: ByteField("LowerTransmitPowerThreshold", SignedIntegerAttributeType, 0x0002, 129, mapset.NewSetWith(Read, Write), false, true, false, 15),
- 16: ByteField("UpperTransmitPowerThreshold", SignedIntegerAttributeType, 0x0001, 129, mapset.NewSetWith(Read, Write), false, true, false, 16),
- },
- Access: CreatedByOnu,
- Support: UnknownSupport,
- Alarms: AlarmMap{
- 0: "Low received optical power",
- 1: "High received optical power",
- 2: "SF",
- 3: "SD",
- 4: "Low transmit optical power",
- 5: "High transmit optical power",
- 6: "Laser bias current",
- },
- }
-}
-
-// NewAniG (class ID 263) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewAniG(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*anigBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/attributeme.go b/vendor/github.com/opencord/omci-lib-go/generated/attributeme.go
deleted file mode 100644
index 80f4e30..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/attributeme.go
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// AttributeMeClassID is the 16-bit ID for the OMCI
-// Managed entity Attribute ME
-const AttributeMeClassID ClassID = ClassID(289)
-
-var attributemeBME *ManagedEntityDefinition
-
-// AttributeMe (class ID #289)
-// This ME describes a particular attribute type that is supported by the ONU. This ME is not
-// included in an MIB upload.
-//
-// Relationships
-// One or more attribute entities are related to each ME entity. More than one ME entity can refer
-// to a given attribute entity.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. This number is
-// the same as the one that appears in the attributes table in the ME. Only one instance of each
-// unique attribute need be created. The ONU can assign attribute numbering as it pleases, out of
-// the pool of 64K IDs; however, it is suggested that the numbering follow a rational scheme to aid
-// human readability. (R) (mandatory) (2-bytes)
-//
-// Name
-// Name: This attribute contains a 25-byte mnemonic tag for the attribute. Strings shorter than
-// 25-bytes are padded with null characters. (R) (mandatory) (25-bytes)
-//
-// Size
-// Size: This attribute contains the size of the attribute, in bytes. The value 0 indicates that
-// the attribute can have a variable/unknown size. (R) (mandatory) (2-bytes)
-//
-// Access
-// (R) (mandatory) (1-byte)
-//
-// Format
-// (R) (mandatory) (1-byte)
-//
-// Lower Limit
-// Lower limit: This attribute provides the lowest value for the attribute. Valid for numeric types
-// (pointer, signed integer, unsigned integer) only. For attributes smaller than 4-bytes, the
-// desired numeric value is expressed in 4-byte representation (for example, the 2s complement
-// 1-byte integer 0xFE is expressed as 0xFFFF-FFFE; the unsigned 1-byte integer 0xFE is expressed
-// as 0x0000-00FE). (R) (mandatory) (4-bytes)
-//
-// Upper Limit
-// Upper limit: This attribute provides the highest value for the attribute. It has the same
-// validity and format as the lower limit attribute. (R) (mandatory) (4-bytes)
-//
-// Bit Field
-// Bit field: This attribute is a mask of the supported bits in a bit field attribute, valid for
-// bit field type only. A 1 in any position signifies that its code point is supported, while 0
-// indicates that it is not supported. For bit fields smaller than 4-bytes, the attribute is
-// aligned at the least significant end of the mask. (R) (mandatory) (4-bytes)
-//
-// Code Points Table
-// Code points table: This attribute lists the code points supported by an enumerated attribute.
-// (R) (mandatory) (2 * Q bytes, where Q is the number of entries in the table.)
-//
-// Support
-// (R) (mandatory) (1-byte)
-//
-type AttributeMe struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- attributemeBME = &ManagedEntityDefinition{
- Name: "AttributeMe",
- ClassID: 289,
- MessageTypes: mapset.NewSetWith(
- Get,
- GetNext,
- ),
- AllowedAttributeMask: 0xff80,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
- 1: MultiByteField("Name", OctetsAttributeType, 0x8000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 1),
- 2: Uint16Field("Size", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
- 3: ByteField("Access", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
- 4: ByteField("Format", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
- 5: Uint32Field("LowerLimit", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
- 6: Uint32Field("UpperLimit", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
- 7: Uint32Field("BitField", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
- 8: TableField("CodePointsTable", TableAttributeType, 0x0100, TableInfo{nil, 2}, mapset.NewSetWith(Read), false, false, false, 8),
- 9: ByteField("Support", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
- },
- Access: CreatedByOnu,
- Support: UnknownSupport,
- }
-}
-
-// NewAttributeMe (class ID 289) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewAttributeMe(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*attributemeBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/dot1agcfmstack.go b/vendor/github.com/opencord/omci-lib-go/generated/dot1agcfmstack.go
deleted file mode 100644
index 882a1b1..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/dot1agcfmstack.go
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// Dot1AgCfmStackClassID is the 16-bit ID for the OMCI
-// Managed entity Dot1ag CFM stack
-const Dot1AgCfmStackClassID ClassID = ClassID(305)
-
-var dot1agcfmstackBME *ManagedEntityDefinition
-
-// Dot1AgCfmStack (class ID #305)
-// This ME reports the maintenance status of a bridge port at any given time. An ONU that supports
-// [IEEE 802.1ag] functionality automatically creates an instance of the dot1ag CFM stack ME for
-// each MAC bridge or IEEE 802.1p mapper, depending on its provisioning model.
-//
-// The dot1ag CFM stack also lists any VLANs and bridge ports against which configuration errors
-// are currently identified. The ONU should reject operations that create configuration errors.
-// However, these errors can arise because of operations on other MEs that are not necessarily
-// possible to detect during CFM configuration.
-//
-// Relationships
-// An ONU that supports [IEEE 802.1ag] creates one instance of this ME for each MAC bridge or IEEE
-// 802.1p mapper, depending on its provisioning model. It should not create an instance for an
-// IEEE-802.1p mapper that is associated with a MAC bridge.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies an instance of this ME. Through an
-// identical ID, this ME is implicitly linked to an instance of the MAC bridge service profile ME
-// or an IEEE 802.1p mapper ME. It is expected that an ONU will implement CFM on bridges or on
-// IEEE-802.1p mappers, but not both. For precision, the reference is disambiguated by the value of
-// the layer 2 type pointer attribute. (R) (mandatory) (2-bytes)
-//
-// Layer 2 Type
-// Layer 2 type: This attribute specifies whether the dot1ag CFM stack is associated with a MAC
-// bridge service profile (value 0) or an IEEE 802.1p mapper (value 1). (R) (mandatory) (1-byte)
-//
-// Mp Status Table
-// (R) (mandatory) (18N bytes)
-//
-// Configuration Error List Table
-// (R) (mandatory) (5N bytes)
-//
-type Dot1AgCfmStack struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- dot1agcfmstackBME = &ManagedEntityDefinition{
- Name: "Dot1AgCfmStack",
- ClassID: 305,
- MessageTypes: mapset.NewSetWith(
- Get,
- GetNext,
- ),
- AllowedAttributeMask: 0xe000,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
- 1: ByteField("Layer2Type", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
- 2: TableField("MpStatusTable", TableAttributeType, 0x4000, TableInfo{nil, 18}, mapset.NewSetWith(Read), false, false, false, 2),
- 3: TableField("ConfigurationErrorListTable", TableAttributeType, 0x2000, TableInfo{nil, 5}, mapset.NewSetWith(Read), true, false, false, 3),
- },
- Access: CreatedByOnu,
- Support: UnknownSupport,
- }
-}
-
-// NewDot1AgCfmStack (class ID 305) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewDot1AgCfmStack(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*dot1agcfmstackBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/dot1agdefaultmdlevel.go b/vendor/github.com/opencord/omci-lib-go/generated/dot1agdefaultmdlevel.go
deleted file mode 100644
index 2cb7823..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/dot1agdefaultmdlevel.go
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// Dot1AgDefaultMdLevelClassID is the 16-bit ID for the OMCI
-// Managed entity Dot1ag default MD level
-const Dot1AgDefaultMdLevelClassID ClassID = ClassID(301)
-
-var dot1agdefaultmdlevelBME *ManagedEntityDefinition
-
-// Dot1AgDefaultMdLevel (class ID #301)
-// The collection of the functionality called a maintenance half-function (MHF) is not explicitly
-// modelled as a ME by either [IEEE 802.1ag] or the OMCI. The ONU automatically creates MHFs
-// according to parameters specified in a dot1ag MD or a dot1ag MA ME; the dot1ag default MD level
-// ME catches the corner cases not covered by other MEs, specifically VLANs not included by any
-// defined MA.
-//
-// The dot1ag default MD level comprises a configurable table, each entry of which specifies
-// default MHF functionality for some set of VLANs. Once a set of VLANs is defined, operations to
-// different table entries or to dot1ag MAs that conflict with the set membership should be denied.
-// In addition, catch-all attributes are defined to specify MHF functionality when there is no
-// match to either a table entry or an MA.
-//
-// Relationships
-// An ONU that supports [IEEE 802.1ag] automatically creates one instance of this ME for each MAC
-// bridge or IEEE 802.1p mapper, depending on the ONU's provisioning model. It should not create an
-// instance for an IEEE 802.1p mapper that is associated with a MAC bridge.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies an instance of this ME. Through an
-// identical ID, this ME is implicitly linked to an instance of the MAC bridge service profile ME
-// or an IEEE 802.1p mapper ME. It is expected that an ONU will implement CFM on bridges or on
-// IEEE-802.1p mappers, but not both, depending on its provisioning model. For precision, the
-// reference is disambiguated by the value of the layer 2 type pointer attribute. (R) (mandatory)
-// (2-bytes)
-//
-// Layer 2 Type
-// Layer 2 type: This attribute specifies whether the dot1ag default MD level ME is associated with
-// a MAC bridge service profile (value 0) or an IEEE 802.1p mapper (value-1). (R) (mandatory)
-// (1-byte)
-//
-// Catchall Level
-// Catchall level: This attribute ranges from 0..7 and specifies the MD level of MHFs created when
-// no specific match is found. (R,-W) (mandatory) (1-byte)
-//
-// Catchall Mhf Creation
-// (R,-W) (mandatory) (1-byte)
-//
-// Catchall Sender Id Permission
-// Catchall sender ID permission: This attribute determines the contents of the sender ID TLV
-// included in CFM messages transmitted by MPs when no more specific match is found. This attribute
-// is identical to that defined in the description of the dot1ag MD ME (i.e., excluding code point
-// 5, defer). (R,-W) (mandatory) (1-byte)
-//
-// Default Md Level Table
-// (R,-W) (mandatory) (29-bytes * N entries)
-//
-type Dot1AgDefaultMdLevel struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- dot1agdefaultmdlevelBME = &ManagedEntityDefinition{
- Name: "Dot1AgDefaultMdLevel",
- ClassID: 301,
- MessageTypes: mapset.NewSetWith(
- Get,
- GetNext,
- Set,
- SetTable,
- ),
- AllowedAttributeMask: 0xf800,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
- 1: ByteField("Layer2Type", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
- 2: ByteField("CatchallLevel", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
- 3: ByteField("CatchallMhfCreation", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3),
- 4: ByteField("CatchallSenderIdPermission", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4),
- 5: TableField("DefaultMdLevelTable", TableAttributeType, 0x0800, TableInfo{nil, 29}, mapset.NewSetWith(Read, Write), false, false, false, 5),
- },
- Access: CreatedByOnu,
- Support: UnknownSupport,
- }
-}
-
-// NewDot1AgDefaultMdLevel (class ID 301) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewDot1AgDefaultMdLevel(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*dot1agdefaultmdlevelBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/dot1agmep.go b/vendor/github.com/opencord/omci-lib-go/generated/dot1agmep.go
deleted file mode 100644
index 8d6db66..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/dot1agmep.go
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// Dot1AgMepClassID is the 16-bit ID for the OMCI
-// Managed entity Dot1ag MEP
-const Dot1AgMepClassID ClassID = ClassID(302)
-
-var dot1agmepBME *ManagedEntityDefinition
-
-// Dot1AgMep (class ID #302)
-// This ME models an MEP as defined primarily in [IEEE 802.1ag] and secondarily in [ITUT Y.1731].
-// It is created and deleted by the OLT. An MEP exists at one of eight possible maintenance levels,
-// and resides at the boundary of a MD. It inherits a name, and optionally a set of associated
-// VLANs, from its associated MA.
-//
-// Relationships
-// One or more MEPs may be associated with a MAC bridge port or an IEEE 802.1p mapper in the
-// absence of a MAC bridge. An MEP is also associated with zero or more VLANs and an MA.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
-// (mandatory) (2-bytes)
-//
-// Layer 2 Entity Pointer
-// Layer 2 entity pointer: Depending on the value of the layer 2 type attribute, this pointer
-// specifies the MAC bridge port configuration data ME or the IEEE 802.1p mapper service profile ME
-// with which this MEP is associated. (R,-W, setbycreate) (mandatory) (2-bytes)
-//
-// Layer 2 Type
-// Layer 2 type: This attribute specifies whether the MA is associated with a MAC bridge port
-// (value 0) or an IEEE 802.1p mapper (value 1). (R,-W, setbycreate) (mandatory) (1-byte)
-//
-// Ma Pointer
-// MA pointer: This pointer specifies the maintenance association with which this MEP is
-// associated. (R,-W, setbycreate) (mandatory) (2-bytes)
-//
-// Mep Id
-// MEP ID: This attribute specifies the MEP's own identity in the MA. For a given MA, the MEP ID
-// must be unique throughout the network defined by the MD. The MEP ID is defined in the range
-// 1..8191. The value 0 indicates that no MEP ID is (yet) configured. (R,-W, setbycreate)
-// (mandatory) (2-bytes)
-//
-// Mep Control
-// (R,-W, setbycreate) (mandatory) (1-byte)
-//
-// Primary Vlan
-// Primary VLAN: This attribute is a 12-bit VLAN ID. The value 0 indicates that the MEP inherits
-// its primary VLAN from its parent MA. CFM messages, except forwarded LTMs, are tagged with the
-// primary VLAN ID. If explicitly specified, the value of this attribute must be one of the VLANs
-// associated with the parent MA. (R,-W, setbycreate) (mandatory) (2-bytes)
-//
-// Administrative State
-// Administrative state: This attribute locks (1) and unlocks (0) the functions performed by this
-// ME. Administrative state is further described in clause A.1.6. (R,-W, setbycreate) (mandatory)
-// (1-byte)
-//
-// Ccm And Ltm Priority
-// CCM and LTM priority: Ranging from 0..7, this attribute permits CCM and LTM frames to be
-// explicitly prioritized, which may be needed if flows are separated, e.g., by 802.1p priority.
-// The priority specified in this attribute is also used in linktrace reply (LTR) frames originated
-// by this MEP. The value 0xFF selects the IEEE 802.1ag default, whereby CCM and LTM frames are
-// transmitted with the highest Ethernet priority available. (R,-W, setbycreate) (mandatory)
-// (1-byte)
-//
-// Egress Identifier
-// Egress identifier: This attribute comprises 8-bytes to be included in LTMs. They allow received
-// LTRs to be directed to the correct originator. The attribute includes the originator MAC address
-// and a locally defined identifier. If this field is 0, the ONU uses the MEP's MAC address, with 0
-// as the locally defined identifier. (R,-W, setbycreate) (mandatory) (8-bytes)
-//
-// Peer Mep Ids
-// Peer MEP IDs: This attribute lists the expected peer MEPs for CCMs, 2-bytes per MEP ID. [IEEE
-// 802.1ag] allows for multipoint networks, and therefore a list of peer MEPs. This attribute
-// allows for up to 12 peers for a given MEP, though GPON applications are expected to need only a
-// single peer. Missing or unexpected messages trigger alarm declaration after a soak interval.
-// Unused peer MEP slots should be set to 0. (R,-W) (mandatory) (24-bytes)
-//
-// Eth Ais Control
-// (R,-W, setbycreate) (mandatory if ETH AIS is enabled) (1-byte)
-//
-// Fault Alarm Threshold
-// (R,-W, setbycreate) (optional) (1-byte)
-//
-// Alarm Declaration Soak Time
-// Alarm declaration soak time: This attribute defines the defect soak time that must elapse before
-// the MEP declares an alarm. It is expressed in 10-ms units with a range of 250 to 1000, i.e.,
-// 2.5-s to 10-s. The default is recommended to be 2.5 seconds. (R,-W) (mandatory) (2-bytes)
-//
-// Alarm Clear Soak Time
-// Alarm clear soak time: This attribute defines the defect-free soak time that must elapse before
-// the MEP clears an alarm. It is expressed in intervals of 10-ms with a range of 250 to 1-000,
-// i.e., 2.5-s to 10-s. The default is recommended to be 10-s. (R,-W) (mandatory) (2-bytes)
-//
-type Dot1AgMep struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- dot1agmepBME = &ManagedEntityDefinition{
- Name: "Dot1AgMep",
- ClassID: 302,
- MessageTypes: mapset.NewSetWith(
- Create,
- Delete,
- Get,
- Set,
- ),
- AllowedAttributeMask: 0xfffc,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
- 1: Uint16Field("Layer2EntityPointer", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
- 2: ByteField("Layer2Type", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
- 3: Uint16Field("MaPointer", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
- 4: Uint16Field("MepId", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
- 5: ByteField("MepControl", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
- 6: Uint16Field("PrimaryVlan", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
- 7: ByteField("AdministrativeState", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
- 8: ByteField("CcmAndLtmPriority", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
- 9: Uint64Field("EgressIdentifier", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 9),
- 10: MultiByteField("PeerMepIds", OctetsAttributeType, 0x0040, 24, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"), mapset.NewSetWith(Read, Write), false, false, false, 10),
- 11: ByteField("EthAisControl", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 11),
- 12: ByteField("FaultAlarmThreshold", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 12),
- 13: Uint16Field("AlarmDeclarationSoakTime", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, false, false, 13),
- 14: Uint16Field("AlarmClearSoakTime", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), false, false, false, 14),
- },
- Access: CreatedByOlt,
- Support: UnknownSupport,
- Alarms: AlarmMap{
- 0: "RDI CCM",
- 1: "MAC status",
- 2: "Remote CCM",
- 3: "Error CCM",
- 4: "Xcon CCM",
- 5: "Unexpected period",
- 6: "AIS",
- },
- }
-}
-
-// NewDot1AgMep (class ID 302) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewDot1AgMep(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*dot1agmepBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/dot1xportextensionpackage.go b/vendor/github.com/opencord/omci-lib-go/generated/dot1xportextensionpackage.go
deleted file mode 100644
index 428d9de..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/dot1xportextensionpackage.go
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// Dot1XPortExtensionPackageClassID is the 16-bit ID for the OMCI
-// Managed entity Dot1X port extension package
-const Dot1XPortExtensionPackageClassID ClassID = ClassID(290)
-
-var dot1xportextensionpackageBME *ManagedEntityDefinition
-
-// Dot1XPortExtensionPackage (class ID #290)
-// An instance of this ME represents a set of attributes that control a port's IEEE 802.1X
-// operation. It is created and deleted autonomously by the ONU upon the creation or deletion of a
-// PPTP that supports [IEEE 802.1X] authentication of customer premises equipment (CPE).
-//
-// Relationships
-// An instance of this ME is associated with a PPTP that performs IEEE 802.1X authentication of CPE
-// (e.g., Ethernet or DSL).
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute provides a unique number for each instance of this ME. Its
-// value is the same as that of its associated PPTP (i.e., slot and port number). (R) (mandatory)
-// (2-bytes)
-//
-// Dot1X Enable
-// Dot1x enable: If true, this Boolean attribute forces the associated port to authenticate via
-// [IEEE 802.1X] as a precondition of normal service. The default value false does not impose IEEE
-// 802.1X authentication on the associated port. (R,-W) (mandatory) (1-byte)
-//
-// Action Register
-// (W) (mandatory) (1-byte)
-//
-// Authenticator Pae State
-// (R) (optional) (1-byte)
-//
-// Backend Authentication State
-// (R) (optional) (1-byte)
-//
-// Admin Controlled Directions
-// Admin controlled directions: This attribute controls the directionality of the port's
-// authentication requirement. The default value 0 indicates that control is imposed in both
-// directions. The value 1 indicates that control is imposed only on traffic from the subscriber
-// towards the network. (R,-W) (optional) (1-byte)
-//
-// Operational Controlled Directions
-// Operational controlled directions: This attribute indicates the directionality of the port's
-// current authentication state. The value 0 indicates that control is imposed in both directions.
-// The value 1 indicates that control is imposed only on traffic from the subscriber towards the
-// network. (R) (optional) (1-byte)
-//
-// Authenticator Controlled Port Status
-// Authenticator controlled port status: This attribute indicates whether the controlled port is
-// currently authorized (1) or unauthorized (2). (R) (optional) (1-byte)
-//
-// Quiet Period
-// Quiet period: This attribute specifies the interval between EAP request/identity invitations
-// sent to the peer. Other events such as carrier present or EAPOL start frames from the peer may
-// trigger an EAP request/identity frame from the ONU at any time; this attribute controls the
-// ONU's periodic behaviour in the absence of these other inputs. It is expressed in seconds.
-// (R,-W) (optional) (2-bytes)
-//
-// Server Timeout Period
-// Server timeout period: This attribute specifies the time the ONU will wait for a response from
-// the radius server before timing out. Within this maximum interval, the ONU may initiate several
-// retransmissions with exponentially increasing delay. Upon timeout, the ONU may try another
-// radius server if there is one, or invoke the fallback policy, if no alternate radius servers are
-// available. Server timeout is expressed in seconds, with a default value of 30 and a maximum
-// value of 65535. (R,-W) (optional) (2-bytes)
-//
-// Re_Authentication Period
-// Re-authentication period: This attribute records the re-authentication interval specified by the
-// radius authentication server. It is expressed in seconds. The attribute is only meaningful after
-// a port has been authenticated. (R) (optional) (2-bytes)
-//
-// Re_Authentication Enabled
-// Re-authentication enabled: This Boolean attribute records whether the radius authentication
-// server has enabled re-authentication on this service (true) or not (false). The attribute is
-// only meaningful after a port has been authenticated. (R) (optional) (1-byte)
-//
-// Key Transmission Enabled
-// Key transmission enabled: This Boolean attribute indicates whether key transmission is enabled
-// (true) or not (false). This feature is not required; the parameter is listed here for
-// completeness vis-`a-vis [IEEE 802.1X]. (R,-W) (optional) (1-byte)
-//
-type Dot1XPortExtensionPackage struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- dot1xportextensionpackageBME = &ManagedEntityDefinition{
- Name: "Dot1XPortExtensionPackage",
- ClassID: 290,
- MessageTypes: mapset.NewSetWith(
- Get,
- Set,
- ),
- AllowedAttributeMask: 0xfff0,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
- 1: ByteField("Dot1XEnable", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
- 2: ByteField("ActionRegister", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Write), false, false, false, 2),
- 3: ByteField("AuthenticatorPaeState", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, true, false, 3),
- 4: ByteField("BackendAuthenticationState", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, true, false, 4),
- 5: ByteField("AdminControlledDirections", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, true, false, 5),
- 6: ByteField("OperationalControlledDirections", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, true, false, 6),
- 7: ByteField("AuthenticatorControlledPortStatus", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, true, false, 7),
- 8: Uint16Field("QuietPeriod", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, true, false, 8),
- 9: Uint16Field("ServerTimeoutPeriod", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9),
- 10: Uint16Field("ReAuthenticationPeriod", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, true, false, 10),
- 11: ByteField("ReAuthenticationEnabled", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, true, false, 11),
- 12: ByteField("KeyTransmissionEnabled", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
- },
- Access: CreatedByOnu,
- Support: UnknownSupport,
- Alarms: AlarmMap{
- 0: "dot1x local authentication - allowed",
- 1: "dot1x local authentication - denied",
- },
- }
-}
-
-// NewDot1XPortExtensionPackage (class ID 290) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewDot1XPortExtensionPackage(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*dot1xportextensionpackageBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/enhancedsecuritycontrol.go b/vendor/github.com/opencord/omci-lib-go/generated/enhancedsecuritycontrol.go
deleted file mode 100644
index af3fa3c..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/enhancedsecuritycontrol.go
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// EnhancedSecurityControlClassID is the 16-bit ID for the OMCI
-// Managed entity Enhanced security control
-const EnhancedSecurityControlClassID ClassID = ClassID(332)
-
-var enhancedsecuritycontrolBME *ManagedEntityDefinition
-
-// EnhancedSecurityControl (class ID #332)
-// This ME contains the capabilities, parameters and controls of enhanced GPON security features
-// when they are negotiated via the OMCI (Note). The attributes in this ME are intended to be used
-// to implement a symmetric-key-based three step authentication process as described in the
-// supplemental information section in the following.
-//
-// NOTE - If an ITU-T G.987 system uses 802.1X authentication as defined in [ITU-T G.987.3], the
-// only applicable attribute of this ME is the broadcast key table.
-//
-// Relationships
-// One instance of this ME is associated with the ONU ME.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. There is only
-// one instance, number 0. (R) (mandatory) (2 bytes)
-//
-// Olt Crypto Capabilities
-// (W) (mandatory) (16 bytes)
-//
-// Olt Random Challenge Table
-// NOTE - It is assumed that the length of OLT_challenge is always an integer multiple of 16-bytes.
-//
-// Olt Challenge Status
-// The ONU initializes this attribute to the value false. (R, W) (mandatory) (1-byte)
-//
-// Onu Selected Crypto Capabilities
-// ONU selected crypto capabilities: This attribute specifies the cryptographic capability selected
-// by the ONU in authentication step 2. Its value specifies one of the bit positions that has the
-// value 1 in the OLT crypto capabilities attribute. (R) (mandatory) (1 byte)
-//
-// Onu Random Challenge Table
-// ONU random challenge table: This attribute specifies the random challenge ONU_challenge issued
-// by the ONU during authentication step 2. It is structured as a table, with each entry being
-// 16-bytes of content. ONU_challenge is the concatenation of all 16-byte content fields in the
-// table. Once the OLT triggers a response to be generated using the OLT challenge status
-// attribute, the ONU generates the response and writes the table (in a single operation). The AVC
-// generated by this attribute signals to the OLT that the challenge is ready, so that the OLT can
-// commence a get/get-next sequence to obtain the table's contents. (R) (mandatory) (16 * P-bytes)
-//
-// Onu Authentication Result Table
-// Once the OLT triggers a response to be generated using the OLT challenge status attribute, the
-// ONU generates ONU_result and writes the table (in a single operation). The AVC generated by this
-// attribute signals to the OLT that the response is ready, so that the OLT can commence a get/get-
-// next sequence to obtain the table's contents. (R) (mandatory) (16 * Q-bytes)
-//
-// Olt Authentication Result Table
-// This attribute is structured as a table, with each entry being 17 bytes. The first byte is the
-// table row number, starting at 1; the remaining 16 bytes are content. OLT_result is the
-// concatenation of all 16-byte content fields. The OLT writes all entries into the table, and then
-// triggers the ONU's processing of the table using the OLT result status attribute. The number of
-// rows R is implicit in the choice of hash algorithm. The OLT can clear the table with a set
-// operation to row 0. (W) (mandatory) (17 * R-bytes)
-//
-// Olt Result Status
-// (R, W) (mandatory) (1 byte)
-//
-// Onu Authentication Status
-// (R) (mandatory) (1 byte)
-//
-// Master Session Key Name
-// Upon the invalidation of a master session key (e.g., due to an ONU reset or deactivation, or due
-// to an ONU-local decision that the master session key has expired), the ONU sets the master
-// session key name to all zeros. (R) (mandatory) (16 bytes)
-//
-// Broadcast Key Table
-// (R, W) (optional) (18N bytes)
-//
-// Effective Key Length
-// Effective key length: This attribute specifies the maximum effective length, in bits, of keys
-// generated by the ONU. (R) (optional) (2 bytes)
-//
-type EnhancedSecurityControl struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- enhancedsecuritycontrolBME = &ManagedEntityDefinition{
- Name: "EnhancedSecurityControl",
- ClassID: 332,
- MessageTypes: mapset.NewSetWith(
- Get,
- GetNext,
- Set,
- ),
- AllowedAttributeMask: 0xfff0,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
- 1: MultiByteField("OltCryptoCapabilities", OctetsAttributeType, 0x8000, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Write), false, false, false, 1),
- 2: TableField("OltRandomChallengeTable", TableAttributeType, 0x4000, TableInfo{nil, 17}, mapset.NewSetWith(Read, Write), false, false, false, 2),
- 3: ByteField("OltChallengeStatus", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3),
- 4: ByteField("OnuSelectedCryptoCapabilities", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
- 5: TableField("OnuRandomChallengeTable", TableAttributeType, 0x0800, TableInfo{nil, 16}, mapset.NewSetWith(Read), true, false, false, 5),
- 6: TableField("OnuAuthenticationResultTable", TableAttributeType, 0x0400, TableInfo{nil, 16}, mapset.NewSetWith(Read), true, false, false, 6),
- 7: TableField("OltAuthenticationResultTable", TableAttributeType, 0x0200, TableInfo{nil, 17}, mapset.NewSetWith(Read, Write), false, false, false, 7),
- 8: ByteField("OltResultStatus", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, false, false, 8),
- 9: ByteField("OnuAuthenticationStatus", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), true, false, false, 9),
- 10: MultiByteField("MasterSessionKeyName", OctetsAttributeType, 0x0040, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 10),
- 11: TableField("BroadcastKeyTable", TableAttributeType, 0x0020, TableInfo{nil, 18}, mapset.NewSetWith(Read, Write), false, true, false, 11),
- 12: Uint16Field("EffectiveKeyLength", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, true, false, 12),
- },
- Access: CreatedByOnu,
- Support: UnknownSupport,
- }
-}
-
-// NewEnhancedSecurityControl (class ID 332) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewEnhancedSecurityControl(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*enhancedsecuritycontrolBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/ethernetframeextendedpm.go b/vendor/github.com/opencord/omci-lib-go/generated/ethernetframeextendedpm.go
deleted file mode 100644
index 6ff360c..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/ethernetframeextendedpm.go
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// EthernetFrameExtendedPmClassID is the 16-bit ID for the OMCI
-// Managed entity Ethernet frame extended PM
-const EthernetFrameExtendedPmClassID ClassID = ClassID(334)
-
-var ethernetframeextendedpmBME *ManagedEntityDefinition
-
-// EthernetFrameExtendedPm (class ID #334)
-// This ME collects some of the PM data at a point where an Ethernet flow can be observed. It is
-// based on the Etherstats group of [IETF RFC 2819]. Instances of this ME are created and deleted
-// by the OLT. References to received frames are to be interpreted as the number of frames entering
-// the monitoring point in the direction specified by the control block.
-//
-// For a complete discussion of generic PM architecture, refer to clause I.4.
-//
-// Relationships
-// An instance of this ME may be associated with an instance of an ME at any Ethernet interface
-// within the ONU. The specific ME is identified in the control block attribute.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. To facilitate
-// discovery, the identification of instances sequentially starting with 1 is encouraged. (R,
-// setbycreate) (mandatory) (2 bytes)
-//
-// Interval End Time
-// Interval end time: This attribute identifies the most recently finished 15-min interval. If
-// continuous accumulation is enabled in the control block, this attribute is not used and has the
-// fixed value 0. (R) (mandatory) (1 byte)
-//
-// Control Block
-// (R, W, setbycreate) (mandatory) (16 bytes)
-//
-// Drop Events
-// Drop events: The total number of events in which frames were dropped due to a lack of resources.
-// This is not necessarily the number of frames dropped; it is the number of times this event was
-// detected. (R) (mandatory) (4 bytes)
-//
-// Octets
-// Octets: The total number of octets received, including those in bad frames, excluding framing
-// bits, but including FCS. (R) (mandatory) (4 bytes)
-//
-// Frames
-// Frames: The total number of frames received, including bad frames, broadcast frames and
-// multicast frames. (R) (mandatory) (4 bytes)
-//
-// Broadcast Frames
-// Broadcast frames: The total number of received good frames directed to the broadcast address.
-// This does not include multicast frames. (R) (mandatory) (4 bytes)
-//
-// Multicast Frames
-// Multicast frames: The total number of received good frames directed to a multicast address. This
-// does not include broadcast frames. (R) (mandatory) (4 bytes)
-//
-// Crc Errored Frames
-// CRC errored frames: The total number of frames received that had a length (excluding framing
-// bits, but including FCS octets) of between 64 and 1518 octets, inclusive, but had either a bad
-// FCS with an integral number of octets (FCS error) or a bad FCS with a non-integral number of
-// octets (alignment error). (R) (mandatory) (4 bytes)
-//
-// Undersize Frames
-// Undersize frames: The total number of frames received that were less than 64 octets long but
-// were otherwise well formed (excluding framing bits, but including FCS octets). (R) (mandatory)
-// (4 bytes)
-//
-// Oversize Frames
-// Oversize frames: The total number of frames received that were longer than 1518 octets
-// (excluding framing bits, but including FCS octets) and were otherwise well formed. (R)
-// (mandatory) (4 bytes)
-//
-// Frames 64 Octets
-// Frames 64 octets: The total number of received frames (including bad frames) that were 64-octets
-// long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes)
-//
-// Frames 65 To 127 Octets
-// Frames 65 to 127 octets: The total number of received frames (including bad frames) that were
-// 65..127 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
-//
-// Frames 128 To 255 Octets
-// Frames 128 to 255 octets: The total number of frames (including bad frames) received that were
-// 128..255 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
-//
-// Frames 256 To 511 Octets
-// Frames 256 to 511 octets: The total number of frames (including bad frames) received that were
-// 256..511 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
-//
-// Frames 512 To 1 023 Octets
-// Frames 512 to 1-023 octets: The total number of frames (including bad frames) received that were
-// 512..1-023 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
-//
-// Frames 1024 To 1518 Octets
-// Frames 1024 to 1518 octets: The total number of frames (including bad frames) received that were
-// 1024..1518 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
-//
-type EthernetFrameExtendedPm struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- ethernetframeextendedpmBME = &ManagedEntityDefinition{
- Name: "EthernetFrameExtendedPm",
- ClassID: 334,
- MessageTypes: mapset.NewSetWith(
- Create,
- Delete,
- Get,
- Set,
- GetCurrentData,
- ),
- AllowedAttributeMask: 0xffff,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
- 1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
- 2: MultiByteField("ControlBlock", OctetsAttributeType, 0x4000, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
- 3: Uint32Field("DropEvents", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
- 4: Uint32Field("Octets", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
- 5: Uint32Field("Frames", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
- 6: Uint32Field("BroadcastFrames", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
- 7: Uint32Field("MulticastFrames", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
- 8: Uint32Field("CrcErroredFrames", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
- 9: Uint32Field("UndersizeFrames", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
- 10: Uint32Field("OversizeFrames", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
- 11: Uint32Field("Frames64Octets", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
- 12: Uint32Field("Frames65To127Octets", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
- 13: Uint32Field("Frames128To255Octets", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
- 14: Uint32Field("Frames256To511Octets", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
- 15: Uint32Field("Frames512To1023Octets", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
- 16: Uint32Field("Frames1024To1518Octets", CounterAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16),
- },
- Access: CreatedByOlt,
- Support: UnknownSupport,
- Alarms: AlarmMap{
- 1: "Drop events",
- 2: "CRC errored frames",
- 3: "Undersize frames",
- 4: "Oversize frames",
- },
- }
-}
-
-// NewEthernetFrameExtendedPm (class ID 334) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewEthernetFrameExtendedPm(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*ethernetframeextendedpmBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/ethernetframeextendedpm64-bit.go b/vendor/github.com/opencord/omci-lib-go/generated/ethernetframeextendedpm64-bit.go
deleted file mode 100644
index 580319c..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/ethernetframeextendedpm64-bit.go
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// EthernetFrameExtendedPm64BitClassID is the 16-bit ID for the OMCI
-// Managed entity Ethernet frame extended PM 64-bit
-const EthernetFrameExtendedPm64BitClassID ClassID = ClassID(425)
-
-var ethernetframeextendedpm64bitBME *ManagedEntityDefinition
-
-// EthernetFrameExtendedPm64Bit (class ID #425)
-// This ME collects some of the PM data at a point where an Ethernet flow can be observed. It is
-// based on the Etherstats group of [IETF RFC 2819] and [IETF RFC 2863]. Instances of this ME are
-// created and deleted by the OLT. References to received frames are to be interpreted as the
-// number of frames entering the monitoring point in the direction specified by the control block.
-//
-// For a complete discussion of generic PM architecture, refer to clause I.4.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. To facilitate
-// discovery, the identification of instances sequentially starting with 1 is encouraged. (R,
-// setbycreate) (mandatory) (2 bytes)
-//
-// Interval End Time
-// Interval end time: This attribute identifies the most recently finished 15-min interval. If
-// continuous accumulation is enabled in the control block, this attribute is not used and has the
-// fixed value 0. (R) (mandatory) (1 byte)
-//
-// Control Block
-// (R, W, setbycreate) (mandatory) (16 bytes)
-//
-// Drop Events
-// Drop events: The total number of events in which frames were dropped due to a lack of resources.
-// This is not necessarily the number of frames dropped; it is the number of times this event was
-// detected. (R) (mandatory) (4 bytes)
-//
-// Octets
-// Octets: The total number of octets received, including those in bad frames, excluding framing
-// bits, but including FCS. (R) (mandatory) (4 bytes)
-//
-// Frames
-// Frames: The total number of frames received, including bad frames, broadcast frames and
-// multicast frames. (R) (mandatory) (4 bytes)
-//
-// Broadcast Frames
-// Broadcast frames: The total number of received good frames directed to the broadcast address.
-// This does not include multicast frames. (R) (mandatory) (4 bytes)
-//
-// Multicast Frames
-// Multicast frames: The total number of received good frames directed to a multicast address. This
-// does not include broadcast frames. (R) (mandatory) (4 bytes)
-//
-// Crc Errored Frames
-// CRC errored frames: The total number of frames received that had a length (excluding framing
-// bits, but including FCS octets) of between 64 and 1518 octets, inclusive, but had either a bad
-// FCS with an integral number of octets (FCS error) or a bad FCS with a non-integral number of
-// octets (alignment error). (R) (mandatory) (4 bytes)
-//
-// Undersize Frames
-// Undersize frames: The total number of frames received that were less than 64 octets long but
-// were otherwise well formed (excluding framing bits, but including FCS octets). (R) (mandatory)
-// (4 bytes)
-//
-// Oversize Frames
-// Oversize frames: The total number of frames received that were longer than 1518 octets
-// (excluding framing bits, but including FCS octets) and were otherwise well formed. (R)
-// (mandatory) (4 bytes)
-//
-// Frames 64 Octets
-// Frames 64 octets: The total number of received frames (including bad frames) that were 64-octets
-// long, excluding framing bits but including FCS. (R) (mandatory) (4-bytes)
-//
-// Frames 65 To 127 Octets
-// Frames 65 to 127 octets: The total number of received frames (including bad frames) that were
-// 65..127 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
-//
-// Frames 128 To 255 Octets
-// Frames 128 to 255 octets: The total number of frames (including bad frames) received that were
-// 128..255 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
-//
-// Frames 256 To 511 Octets
-// Frames 256 to 511 octets: The total number of frames (including bad frames) received that were
-// 256..511 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
-//
-// Frames 512 To 1 023 Octets
-// Frames 512 to 1-023 octets: The total number of frames (including bad frames) received that were
-// 512..1-023 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
-//
-// Frames 1024 To 1518 Octets
-// Frames 1024 to 1518 octets: The total number of frames (including bad frames) received that were
-// 1024..1518 octets long, excluding framing bits but including FCS. (R) (mandatory) (4 bytes)
-//
-type EthernetFrameExtendedPm64Bit struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- ethernetframeextendedpm64bitBME = &ManagedEntityDefinition{
- Name: "EthernetFrameExtendedPm64Bit",
- ClassID: 425,
- MessageTypes: mapset.NewSetWith(
- Create,
- Delete,
- Get,
- Set,
- GetCurrentData,
- ),
- AllowedAttributeMask: 0xffff,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
- 1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
- 2: MultiByteField("ControlBlock", OctetsAttributeType, 0x4000, 16, toOctets("AAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
- 3: Uint64Field("DropEvents", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
- 4: Uint64Field("Octets", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
- 5: Uint64Field("Frames", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
- 6: Uint64Field("BroadcastFrames", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
- 7: Uint64Field("MulticastFrames", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
- 8: Uint64Field("CrcErroredFrames", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
- 9: Uint64Field("UndersizeFrames", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
- 10: Uint64Field("OversizeFrames", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
- 11: Uint64Field("Frames64Octets", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
- 12: Uint64Field("Frames65To127Octets", CounterAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
- 13: Uint64Field("Frames128To255Octets", CounterAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
- 14: Uint64Field("Frames256To511Octets", CounterAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
- 15: Uint64Field("Frames512To1023Octets", CounterAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
- 16: Uint64Field("Frames1024To1518Octets", CounterAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16),
- },
- Access: CreatedByOlt,
- Support: UnknownSupport,
- Alarms: AlarmMap{
- 1: "Drop events",
- 2: "CRC errored frames",
- 3: "Undersize frames",
- 4: "Oversize frames",
- },
- }
-}
-
-// NewEthernetFrameExtendedPm64Bit (class ID 425) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewEthernetFrameExtendedPm64Bit(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*ethernetframeextendedpm64bitBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/extendedvlantaggingoperationconfigurationdata.go b/vendor/github.com/opencord/omci-lib-go/generated/extendedvlantaggingoperationconfigurationdata.go
deleted file mode 100644
index 57ba11d..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/extendedvlantaggingoperationconfigurationdata.go
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// ExtendedVlanTaggingOperationConfigurationDataClassID is the 16-bit ID for the OMCI
-// Managed entity Extended VLAN tagging operation configuration data
-const ExtendedVlanTaggingOperationConfigurationDataClassID ClassID = ClassID(171)
-
-var extendedvlantaggingoperationconfigurationdataBME *ManagedEntityDefinition
-
-// ExtendedVlanTaggingOperationConfigurationData (class ID #171)
-// This ME organizes data associated with VLAN tagging. Regardless of its point of attachment, the
-// specified tagging operations refer to the upstream direction. Instances of this ME are created
-// and deleted by the OLT.
-//
-// Relationships
-// Zero or one instance of this ME may exist for an instance of any ME that can terminate or modify
-// an Ethernet stream.//// When this ME is associated with a UNI-side TP, it performs its upstream classification and
-// tagging operations before offering the upstream frame to other filtering, bridging or switching
-// functions. In the downstream direction, the defined inverse operation is the last operation
-// performed on the frame before offering it to the UNI-side termination.//// When this ME is associated with an ANI-side TP, it performs its upstream classification and
-// tagging operations as the last step before transmission to the OLT, after having received the
-// upstream frame from other filtering, bridging or switching functions. In the downstream
-// direction, the defined inverse operation is the first operation performed on the frame before
-// offering it to possible filter, bridge or switch functions.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute provides a unique number for each instance of this ME. (R,
-// setbycreate) (mandatory) (2-bytes)
-//
-// Association Type
-// When the extended VLAN tagging ME is associated with the ANI side, it behaves as an upstream
-// egress rule, and as a downstream ingress rule when the downstream mode attribute is equal to 0.
-// When the extended VLAN tagging ME is associated with the UNI side, the extended VLAN tagging ME
-// behaves as an upstream ingress rule, and as a downstream egress rule when the downstream mode
-// attribute is equal to 0.
-//
-// Received Frame Vlan Tagging Operation Table Max Size
-// Received frame VLAN tagging operation table max size: This attribute indicates the maximum
-// number of entries that can be set in the received frame VLAN tagging operation table. (R)
-// (mandatory) (2-bytes)
-//
-// Input Tpid
-// Input TPID: This attribute gives the special TPID value for operations on the input (filtering)
-// side of the table. Typical values include 0x88A8 and 0x9100. (R,-W) (mandatory) (2-bytes)
-//
-// Output Tpid
-// Output TPID: This attribute gives the special TPID value for operations on the output (tagging)
-// side of the table. Typical values include 0x88A8 and 0x9100. (R,-W) (mandatory) (2-bytes)
-//
-// Downstream Mode
-// All other values are reserved. (R, W) (mandatory) (1 byte)
-//
-// Received Frame Vlan Tagging Operation Table
-// 111 Set TPID-=-output TPID, DEI = 1
-//
-// Associated Me Pointer
-// NOTE 5 - When the association type is xDSL, the two MSBs may be used to indicate a bearer
-// channel.
-//
-// Dscp To P Bit Mapping
-// NOTE 6 - If certain bits in the DSCP field are to be ignored in the mapping process, the
-// attribute should be provisioned such that all possible values of those bits produce the same
-// P-bit mapping. This can be applied to the case where instead of full DSCP, the operator wishes
-// to adopt the priority mechanism based on IP precedence, which needs only the three MSBs of the
-// DSCP field.
-//
-type ExtendedVlanTaggingOperationConfigurationData struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- extendedvlantaggingoperationconfigurationdataBME = &ManagedEntityDefinition{
- Name: "ExtendedVlanTaggingOperationConfigurationData",
- ClassID: 171,
- MessageTypes: mapset.NewSetWith(
- Create,
- Delete,
- Get,
- GetNext,
- Set,
- SetTable,
- ),
- AllowedAttributeMask: 0xff00,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
- 1: ByteField("AssociationType", EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
- 2: Uint16Field("ReceivedFrameVlanTaggingOperationTableMaxSize", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
- 3: Uint16Field("InputTpid", UnsignedIntegerAttributeType, 0x2000, 34984, mapset.NewSetWith(Read, Write), false, false, false, 3),
- 4: Uint16Field("OutputTpid", UnsignedIntegerAttributeType, 0x1000, 34984, mapset.NewSetWith(Read, Write), false, false, false, 4),
- 5: ByteField("DownstreamMode", EnumerationAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
- 6: TableField("ReceivedFrameVlanTaggingOperationTable", TableAttributeType, 0x0400, TableInfo{nil, 16}, mapset.NewSetWith(Read, Write), false, false, false, 6),
- 7: Uint16Field("AssociatedMePointer", PointerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
- 8: MultiByteField("DscpToPBitMapping", OctetsAttributeType, 0x0100, 24, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"), mapset.NewSetWith(Read, Write), false, true, false, 8),
- },
- Access: CreatedByOlt,
- Support: UnknownSupport,
- }
-}
-
-// NewExtendedVlanTaggingOperationConfigurationData (class ID 171) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewExtendedVlanTaggingOperationConfigurationData(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*extendedvlantaggingoperationconfigurationdataBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/iphostconfigdata.go b/vendor/github.com/opencord/omci-lib-go/generated/iphostconfigdata.go
deleted file mode 100644
index be0f1cc..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/iphostconfigdata.go
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// IpHostConfigDataClassID is the 16-bit ID for the OMCI
-// Managed entity IP host config data
-const IpHostConfigDataClassID ClassID = ClassID(134)
-
-var iphostconfigdataBME *ManagedEntityDefinition
-
-// IpHostConfigData (class ID #134)
-// The IP host config data configures IPv4 based services offered on the ONU. The ONU automatically
-// creates instances of this ME if IP host services are available. A possible IPv6 stack is
-// supported through the IPv6 host config data ME. In this clause, references to IP addresses are
-// understood to mean IPv4.
-//
-// Relationships
-// An instance of this ME is associated with the ONU ME. Any number of TCP/UDP config data MEs can
-// point to the IP host config data, to model any number of ports and protocols. Performance may be
-// monitored through an implicitly linked IP host PM history data ME.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. The ONU creates
-// as many instances as there are independent IPv4 stacks on the ONU. To facilitate discovery, IP
-// host config data MEs should be numbered from 0 upwards. The ONU should create IP(v4) and IPv6
-// host config data MEs with separate ME IDs, such that other MEs can use a single TP type
-// attribute to link with either. (R) (mandatory) (2 bytes)
-//
-// Ip Options
-// (R,-W) (mandatory) (1-byte)
-//
-// Mac Address
-// MAC address: This attribute indicates the MAC address used by the IP node. (R) (mandatory)
-// (6-bytes)
-//
-// Onu Identifier
-// Onu identifier: A unique ONU identifier string. If set to a non-null value, this string is used
-// instead of the MAC address in retrieving dynamic host configuration protocol (DHCP) parameters.
-// If the string is shorter than 25 characters, it must be null terminated. Its default value is 25
-// null bytes. (R,-W) (mandatory) (25-bytes)
-//
-// Ip Address
-// IP address: The address used for IP host services; this attribute has the default value 0.
-// (R,-W) (mandatory) (4-bytes)
-//
-// Mask
-// Mask: The subnet mask for IP host services; this attribute has the default value 0. (R,-W)
-// (mandatory) (4-bytes)
-//
-// Gateway
-// Gateway: The default gateway address used for IP host services; this attribute has the default
-// value 0. (R,-W) (mandatory) (4-bytes)
-//
-// Primary Dns
-// Primary DNS: The address of the primary DNS server; this attribute has the default value 0.
-// (R,-W) (mandatory) (4-bytes)
-//
-// Secondary Dns
-// Secondary DNS: The address of the secondary DNS server; this attribute has the default value 0.
-// (R,-W) (mandatory) (4-bytes)
-//
-// Current Address
-// Current address: Current address of the IP host service. (R) (optional) (4-bytes)
-//
-// Current Mask
-// Current mask: Current subnet mask for the IP host service. (R) (optional) (4-bytes)
-//
-// Current Gateway
-// Current gateway: Current default gateway address for the IP host service. (R) (optional)
-// (4-bytes)
-//
-// Current Primary Dns
-// Current primary DNS: Current primary DNS server address. (R) (optional) (4-bytes)
-//
-// Current Secondary Dns
-// Current secondary DNS: Current secondary DNS server address. (R) (optional) (4-bytes)
-//
-// Domain Name
-// Domain name: If DHCP indicates a domain name, it is presented here. If no domain name is
-// indicated, this attribute is set to a null string. If the string is shorter than 25-bytes, it
-// must be null terminated. The default value is 25 null bytes. (R) (mandatory) (25-bytes)
-//
-// Host Name
-// Host name: If DHCP indicates a host name, it is presented here. If no host name is indicated,
-// this attribute is set to a null string. If the string is shorter than 25-bytes, it must be null
-// terminated. The default value is 25 null bytes. (R) (mandatory) (25-bytes)
-//
-// Relay Agent Options
-// 2/3/4:atm/123.4567
-//
-type IpHostConfigData struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- iphostconfigdataBME = &ManagedEntityDefinition{
- Name: "IpHostConfigData",
- ClassID: 134,
- MessageTypes: mapset.NewSetWith(
- Get,
- Set,
- ),
- AllowedAttributeMask: 0xffff,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
- 1: ByteField("IpOptions", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
- 2: MultiByteField("MacAddress", OctetsAttributeType, 0x4000, 6, toOctets("AAAAAAAA"), mapset.NewSetWith(Read), false, false, false, 2),
- 3: MultiByteField("OnuIdentifier", OctetsAttributeType, 0x2000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 3),
- 4: Uint32Field("IpAddress", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4),
- 5: Uint32Field("Mask", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
- 6: Uint32Field("Gateway", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
- 7: Uint32Field("PrimaryDns", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, false, false, 7),
- 8: Uint32Field("SecondaryDns", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, false, false, 8),
- 9: Uint32Field("CurrentAddress", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), true, true, false, 9),
- 10: Uint32Field("CurrentMask", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), true, true, false, 10),
- 11: Uint32Field("CurrentGateway", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), true, true, false, 11),
- 12: Uint32Field("CurrentPrimaryDns", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read), true, true, false, 12),
- 13: Uint32Field("CurrentSecondaryDns", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read), true, true, false, 13),
- 14: MultiByteField("DomainName", OctetsAttributeType, 0x0004, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), true, false, false, 14),
- 15: MultiByteField("HostName", OctetsAttributeType, 0x0002, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), true, false, false, 15),
- 16: Uint16Field("RelayAgentOptions", UnsignedIntegerAttributeType, 0x0001, 0, mapset.NewSetWith(Read, Write), true, true, false, 16),
- },
- Access: CreatedByOnu,
- Support: UnknownSupport,
- }
-}
-
-// NewIpHostConfigData (class ID 134) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewIpHostConfigData(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*iphostconfigdataBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/mgcperformancemonitoringhistorydata.go b/vendor/github.com/opencord/omci-lib-go/generated/mgcperformancemonitoringhistorydata.go
deleted file mode 100644
index 7a4e457..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/mgcperformancemonitoringhistorydata.go
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// MgcPerformanceMonitoringHistoryDataClassID is the 16-bit ID for the OMCI
-// Managed entity MGC performance monitoring history data
-const MgcPerformanceMonitoringHistoryDataClassID ClassID = ClassID(156)
-
-var mgcperformancemonitoringhistorydataBME *ManagedEntityDefinition
-
-// MgcPerformanceMonitoringHistoryData (class ID #156)
-// The MGC monitoring data ME provides run-time statistics for an active MGC association. Instances
-// of this ME are created and deleted by the OLT.
-//
-// For a complete discussion of generic PM architecture, refer to clause I.4.
-//
-// Relationships
-// An instance of this ME is associated with an instance of the MGC config data or MGC config
-// portal ME.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
-// identical ID, this ME is implicitly linked to an instance of the associated MGC config data or
-// to the MGC config portal ME. If a non-OMCI configuration method is used for VoIP, there can be
-// only one live ME instance, associated with the MGC config portal, and with ME ID 0. (R,
-// setbycreate) (mandatory) (2-bytes)
-//
-// Interval End Time
-// Interval end time: This attribute identifies the most recently finished 15-min interval. (R)
-// (mandatory) (1-byte)
-//
-// Threshold Data 1_2 Id
-// Threshold data 1/2 ID: This attribute points to an instance of the threshold data 1 ME that
-// contains PM threshold values. Since no threshold value attribute number exceeds 7, a threshold
-// data 2 ME is optional. (R,-W, setbycreate) (mandatory) (2-bytes)
-//
-// Received Messages
-// Received messages: This attribute counts the number of received Megaco messages on this
-// association, as defined by [ITUT H.341]. (R) (mandatory) (4-bytes)
-//
-// Received Octets
-// Received octets: This attribute counts the total number of octets received on this association,
-// as defined by [ITU-T H.341]. (R) (mandatory) (4-bytes)
-//
-// Sent Messages
-// Sent messages: This attribute counts the total number of Megaco messages sent over this
-// association, as defined by [ITU-T H.341]. (R) (mandatory) (4-bytes)
-//
-// Sent Octets
-// Sent octets: This attribute counts the total number of octets sent over this association, as
-// defined by [ITU-T H.341]. (R) (mandatory) (4-bytes)
-//
-// Protocol Errors
-// (R) (mandatory) (4-bytes)
-//
-// Transport Losses
-// Transport losses: This attribute counts the total number of transport losses (e.g., socket
-// problems) detected on this association. A link loss is defined as loss of communication with the
-// remote entity due to hardware/transient problems, or problems in related software. (R)
-// (mandatory) (4-bytes)
-//
-// Last Detected Event
-// (R) (mandatory) (1-byte)
-//
-// Last Detected Event Time
-// Last detected event time: This attribute reports the time in seconds since the last event on
-// this association was detected, as defined by [ITU-T H.341]. (R) (mandatory) (4-bytes)
-//
-// Last Detected Reset Time
-// Last detected reset time: This attribute reports the time in seconds since these statistics were
-// last reset, as defined by [ITU-T H.341]. Under normal circumstances, a get action on this
-// attribute would return 900-s to indicate a completed 15-min interval. (R) (mandatory) (4-bytes)
-//
-type MgcPerformanceMonitoringHistoryData struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- mgcperformancemonitoringhistorydataBME = &ManagedEntityDefinition{
- Name: "MgcPerformanceMonitoringHistoryData",
- ClassID: 156,
- MessageTypes: mapset.NewSetWith(
- Create,
- Delete,
- Get,
- Set,
- GetCurrentData,
- ),
- AllowedAttributeMask: 0xffe0,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
- 1: ByteField("IntervalEndTime", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
- 2: Uint16Field("ThresholdData12Id", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
- 3: Uint32Field("ReceivedMessages", CounterAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
- 4: Uint32Field("ReceivedOctets", CounterAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
- 5: Uint32Field("SentMessages", CounterAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
- 6: Uint32Field("SentOctets", CounterAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
- 7: Uint32Field("ProtocolErrors", CounterAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
- 8: Uint32Field("TransportLosses", CounterAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
- 9: ByteField("LastDetectedEvent", CounterAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
- 10: Uint32Field("LastDetectedEventTime", CounterAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
- 11: Uint32Field("LastDetectedResetTime", CounterAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
- },
- Access: CreatedByOlt,
- Support: UnknownSupport,
- Alarms: AlarmMap{
- 0: "MGCP protocol errors",
- 1: "MGCP transport losses",
- },
- }
-}
-
-// NewMgcPerformanceMonitoringHistoryData (class ID 156) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewMgcPerformanceMonitoringHistoryData(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*mgcperformancemonitoringhistorydataBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/mplspseudowireterminationpoint.go b/vendor/github.com/opencord/omci-lib-go/generated/mplspseudowireterminationpoint.go
deleted file mode 100644
index ccd5697..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/mplspseudowireterminationpoint.go
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// MplsPseudowireTerminationPointClassID is the 16-bit ID for the OMCI
-// Managed entity MPLS pseudowire termination point
-const MplsPseudowireTerminationPointClassID ClassID = ClassID(333)
-
-var mplspseudowireterminationpointBME *ManagedEntityDefinition
-
-// MplsPseudowireTerminationPoint (class ID #333)
-// This ME contains the configuration data of a pseudowire whose underlying transport method is
-// MPLS. Instances of this ME are created and deleted by the OLT.
-//
-// Relationships
-// Zero or one instance of this ME is associated with each instance of the pseudowire TP ME.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. (R,
-// setbycreate)-(mandatory) (2 bytes)
-//
-// Tp Type
-// (R, W, setbycreate) (mandatory) (1 byte)
-//
-// Tp Pointer
-// TP pointer: This attribute points to the instance of the TP associated with this MPLS PW TP. The
-// type of the associated TP is determined by the TP type attribute. (R, W, setbycreate)
-// (mandatory) (2 bytes)
-//
-// Mpls Label Indicator
-// (R, W, setbycreate) (mandatory) (1 byte)
-//
-// Mpls Pw Direction
-// (R, W, setbycreate) (mandatory) (1 byte)
-//
-// Mpls Pw Uplink Label
-// MPLS PW uplink label: This attribute specifies the label of the inner MPLS pseudowire upstream.
-// The attribute is not meaningful for unidirectional downstream PWs. (R, W, setbycreate)
-// (mandatory) (4 bytes)
-//
-// Mpls Pw Downlink Label
-// MPLS PW downlink label: This attribute specifies the label of the inner MPLS pseudowire
-// downstream. The attribute is not meaningful for unidirectional upstream PWs. (R, W, setbycreate)
-// (mandatory) (4 bytes)
-//
-// Mpls Pw Tc
-// NOTE 1 - The TC field was previously known as EXP. Refer to [bIETF-RFC-5462].
-//
-// Mpls Tunnel Direction
-// (R, W, setbycreate) (mandatory for double-labelled case) (1 byte)
-//
-// Mpls Tunnel Uplink Label
-// MPLS tunnel uplink label: This attribute specifies the (outer) label for the upstream MPLS
-// tunnel. If the MPLS tunnel is downstream only, this attribute should be set to 0. (R, W,
-// setbycreate) (mandatory for double-labelled case) (4 bytes)
-//
-// Mpls Tunnel Downlink Label
-// MPLS tunnel downlink label: This attribute specifies the (outer) label for the downstream MPLS
-// tunnel. If the MPLS tunnel is upstream only, this attribute should be set to 0. (R, W,
-// setbycreate) (mandatory for double-labelled case) (4 bytes)
-//
-// Mpls Tunnel Tc
-// NOTE 2 - The TC field was previously known as EXP. Refer to [bIETF-RFC-5462].
-//
-// Pseudowire Type
-// (R, W, setbycreate) (mandatory) (2 bytes)
-//
-// Pseudowire Control Word Preference
-// Pseudowire control word preference: When set to true, this Boolean attribute specifies that a
-// control word is to be sent with each packet. Some PW types mandate the use of a control word in
-// any event. In such cases, the value configured for this attribute has no effect on the presence
-// of the control word. (R, W, setbycreate) (optional) (1 byte)
-//
-// Administrative State
-// Administrative state: This attribute locks (1) and unlocks (0) the functions performed by the
-// MPLS pseudowire TP. Administrative state is further described in clause-A.1.6. (R,-W) (optional)
-// (1-byte)
-//
-// Operational State
-// Operational state: This attribute reports whether the ME is currently capable of performing its
-// function. Valid values are enabled (0) and disabled (1). (R) (optional) (1-byte)
-//
-type MplsPseudowireTerminationPoint struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- mplspseudowireterminationpointBME = &ManagedEntityDefinition{
- Name: "MplsPseudowireTerminationPoint",
- ClassID: 333,
- MessageTypes: mapset.NewSetWith(
- Create,
- Delete,
- Get,
- Set,
- ),
- AllowedAttributeMask: 0xfffe,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
- 1: ByteField("TpType", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
- 2: Uint16Field("TpPointer", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
- 3: ByteField("MplsLabelIndicator", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
- 4: ByteField("MplsPwDirection", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
- 5: Uint32Field("MplsPwUplinkLabel", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
- 6: Uint32Field("MplsPwDownlinkLabel", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
- 7: ByteField("MplsPwTc", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
- 8: ByteField("MplsTunnelDirection", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
- 9: Uint32Field("MplsTunnelUplinkLabel", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 9),
- 10: Uint32Field("MplsTunnelDownlinkLabel", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10),
- 11: ByteField("MplsTunnelTc", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 11),
- 12: Uint16Field("PseudowireType", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 12),
- 13: ByteField("PseudowireControlWordPreference", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 13),
- 14: ByteField("AdministrativeState", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), false, true, false, 14),
- 15: ByteField("OperationalState", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read), true, true, false, 15),
- },
- Access: CreatedByOlt,
- Support: UnknownSupport,
- }
-}
-
-// NewMplsPseudowireTerminationPoint (class ID 333) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewMplsPseudowireTerminationPoint(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*mplspseudowireterminationpointBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/multicastoperationsprofileframe.go b/vendor/github.com/opencord/omci-lib-go/generated/multicastoperationsprofileframe.go
deleted file mode 100644
index 6204894..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/multicastoperationsprofileframe.go
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
-* NOTE: This file was hand coded (not generated by omci-parser) due to complexity
-* of the ME's entry in the G.988 (11/2017) specification.
- */
-package generated
-
-import "github.com/deckarep/golang-set"
-
-const MulticastOperationsProfileClassID ClassID = ClassID(309)
-
-var multicastoperationsprofileME *ManagedEntityDefinition
-
-type MulticastOperationsProfile struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- multicastoperationsprofileME = &ManagedEntityDefinition{
- Name: "MulticastOperationsProfile",
- ClassID: 309,
- MessageTypes: mapset.NewSetWith(
- Create,
- Delete,
- Get,
- Set,
- GetNext,
- ),
- AllowedAttributeMask: 0xffff,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
- 1: ByteField("IgmpVersion", EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
- 2: ByteField("IgmpFunction", EnumerationAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
- 3: ByteField("ImmediateLeave", EnumerationAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
- 4: Uint16Field("USIgmpTci", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 4),
- 5: ByteField("USIgmpTagCtrl", EnumerationAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
- 6: Uint32Field("USIgmpRate", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 6),
- 7: TableField("DynamicAccessControlListTable", TableAttributeType, 0x0200, TableInfo{nil, 24}, mapset.NewSetWith(Read, Write), false, false, false, 7),
- 8: TableField("StaticAccessControlListTable", TableAttributeType, 0x0100, TableInfo{nil, 24}, mapset.NewSetWith(Read, Write), false, true, false, 8),
- 9: TableField("LostGroupsListTable", TableAttributeType, 0x0080, TableInfo{nil, 10}, mapset.NewSetWith(Read), false, true, false, 9),
- 10: ByteField("Robustness", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 10),
- 11: Uint32Field("QuerierIp", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 11),
- 12: Uint32Field("QueryInterval", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 12),
- 13: Uint32Field("QuerierMaxResponseTime", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 13),
- 14: Uint32Field("LastMemberResponseTime", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), false, true, false, 14),
- 15: ByteField("UnauthorizedJoinBehaviour", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read, Write), false, true, false, 15),
- 16: MultiByteField("DSIgmpMcastTci", OctetsAttributeType, 0x0001, 3, toOctets("AAAA"), mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 16),
- },
- Access: CreatedByOlt,
- Support: UnknownSupport,
- }
-}
-
-// NewMulticastOperationsProfilePoint (class ID 309) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewMulticastOperationsProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*multicastoperationsprofileME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/multicastsubscriberconfiginfo.go b/vendor/github.com/opencord/omci-lib-go/generated/multicastsubscriberconfiginfo.go
deleted file mode 100644
index b83883b..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/multicastsubscriberconfiginfo.go
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// MulticastSubscriberConfigInfoClassID is the 16-bit ID for the OMCI
-// Managed entity Multicast subscriber config info
-const MulticastSubscriberConfigInfoClassID ClassID = ClassID(310)
-
-var multicastsubscriberconfiginfoBME *ManagedEntityDefinition
-
-// MulticastSubscriberConfigInfo (class ID #310)
-// This ME organizes data associated with multicast management at subscriber ports of IEEE-802.1
-// bridges, including IEEE-802.1p mappers when the provisioning model is mapper-based rather than
-// bridge-based. Instances of this ME are created and deleted by the OLT. Because of backward
-// compatibility considerations, a subscriber port without an associated multicast subscriber
-// config info ME would be expected to support unrestricted multicast access; this ME may therefore
-// be viewed as restrictive, rather than permissive.
-//
-// Through separate attributes, this ME supports either a single multicast operations profile in
-// its backward compatible form, or a list of multicast operations profiles instead (the list may
-// of course contain a single entry). The OLT can determine whether the ONU supports the multiple
-// profile capability by performing a get operation on the optional multicast service package table
-// attribute, which exists only on ONUs that are prepared to support the feature.
-//
-// Relationships
-// An instance of this ME is associated with one instance of the MAC bridge port configuration data
-// or the IEEE-802.1p mapper service profile.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
-// identical ID, this ME is implicitly linked to an instance of the MAC bridge port configuration
-// data or IEEE-802.1p mapper ME. (R, setbycreate) (mandatory) (2-bytes)
-//
-// Me Type
-// (R,-W, setbycreate) (mandatory) (1-byte)
-//
-// Multicast Operations Profile Pointer
-// Multicast operations profile pointer: This attribute points to an instance of the multicast
-// operations profile. This attribute is ignored by the ONU if a non-empty multicast service
-// package table attribute is present. (R,W, set-by-create) (mandatory) (2 bytes)
-//
-// Max Simultaneous Groups
-// Max simultaneous groups: This attribute specifies the maximum number of dynamic multicast groups
-// that may be replicated to the client port at any one time. The recommended default value 0
-// specifies that no administrative limit is to be imposed. (R,-W, setbycreate) (optional)
-// (2-bytes)
-//
-// Max Multicast Bandwidth
-// Max multicast bandwidth: This attribute specifies the maximum imputed dynamic bandwidth, in
-// bytes per second, that may be delivered to the client port at any one time. The recommended
-// default value 0 specifies that no administrative limit is to be imposed. (R,-W, setbycreate)
-// (optional) (4-bytes)
-//
-// Bandwidth Enforcement
-// Bandwidth enforcement: The recommended default value of this Boolean attribute is false, and
-// specifies that attempts to exceed the max multicast bandwidth be counted but honoured. The value
-// true specifies that such attempts be counted and denied. The imputed bandwidth value is taken
-// from the dynamic access control list table, both for a new join request and for pre-existing
-// groups. (R,-W, setbycreate) (optional) (1-byte)
-//
-// Multicast Service Package Table
-// (R,-W) (optional) (20N bytes, where N is the number of entries in the table)
-//
-// Allowed Preview Groups Table
-// Each list entry begins with a table control field:
-//
-type MulticastSubscriberConfigInfo struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- multicastsubscriberconfiginfoBME = &ManagedEntityDefinition{
- Name: "MulticastSubscriberConfigInfo",
- ClassID: 310,
- MessageTypes: mapset.NewSetWith(
- Create,
- Delete,
- Get,
- GetNext,
- Set,
- SetTable,
- ),
- AllowedAttributeMask: 0xfe00,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
- 1: ByteField("MeType", EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
- 2: Uint16Field("MulticastOperationsProfilePointer", PointerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
- 3: Uint16Field("MaxSimultaneousGroups", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 3),
- 4: Uint32Field("MaxMulticastBandwidth", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 4),
- 5: ByteField("BandwidthEnforcement", EnumerationAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
- 6: TableField("MulticastServicePackageTable", TableAttributeType, 0x0400, TableInfo{nil, 20}, mapset.NewSetWith(Read, Write), false, true, false, 6),
- 7: TableField("AllowedPreviewGroupsTable", TableAttributeType, 0x0200, TableInfo{nil, 22}, mapset.NewSetWith(Read, Write), false, false, false, 7),
- },
- Access: CreatedByOlt,
- Support: UnknownSupport,
- }
-}
-
-// NewMulticastSubscriberConfigInfo (class ID 310) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewMulticastSubscriberConfigInfo(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*multicastsubscriberconfiginfoBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/multicastsubscribermonitor.go b/vendor/github.com/opencord/omci-lib-go/generated/multicastsubscribermonitor.go
deleted file mode 100644
index b95256e..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/multicastsubscribermonitor.go
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// MulticastSubscriberMonitorClassID is the 16-bit ID for the OMCI
-// Managed entity Multicast subscriber monitor
-const MulticastSubscriberMonitorClassID ClassID = ClassID(311)
-
-var multicastsubscribermonitorBME *ManagedEntityDefinition
-
-// MulticastSubscriberMonitor (class ID #311)
-// This ME provides the current status of each port with respect to its multicast subscriptions. It
-// may be useful for status monitoring or debugging purposes. The status table includes all dynamic
-// groups currently subscribed by the port.
-//
-// Relationships
-// Instances of this ME are created and deleted at the request of the OLT. One instance may exist
-// for each IEEE-802.1 UNI configured to support multicast subscription.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
-// identical ID, this ME is implicitly linked to an instance of the MAC bridge port configuration
-// data or IEEE-802.1p mapper ME. (R,-setbycreate) (mandatory) (2-bytes)
-//
-// Me Type
-// (R,-W, setbycreate) (mandatory) (1-byte)
-//
-// Current Multicast Bandwidth
-// Current multicast bandwidth: This attribute is the ONU's (BE) estimate of the actual bandwidth
-// currently being delivered to this particular MAC bridge port over all dynamic multicast groups.
-// (R) (optional) (4-bytes)
-//
-// Join Messages Counter
-// Join messages counter: This attribute counts the number of times the corresponding subscriber
-// sent a join message that was accepted. When full, the counter rolls over to 0. (R) (optional)
-// (4-bytes)
-//
-// Bandwidth Exceeded Counter
-// Bandwidth exceeded counter: This attribute counts the number of join messages that did exceed,
-// or would have exceeded, the max multicast bandwidth, whether accepted or denied. When full, the
-// counter rolls over to 0. (R) (optional) (4-bytes)
-//
-// Ipv4 Active Group List Table
-// (R) (mandatory) (24N bytes)
-//
-// Ipv6 Active Group List Table
-// (R) (optional) (58N bytes)
-//
-type MulticastSubscriberMonitor struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- multicastsubscribermonitorBME = &ManagedEntityDefinition{
- Name: "MulticastSubscriberMonitor",
- ClassID: 311,
- MessageTypes: mapset.NewSetWith(
- Create,
- Delete,
- Get,
- GetNext,
- Set,
- ),
- AllowedAttributeMask: 0xfc00,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
- 1: ByteField("MeType", EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
- 2: Uint32Field("CurrentMulticastBandwidth", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, true, false, 2),
- 3: Uint32Field("JoinMessagesCounter", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, true, false, 3),
- 4: Uint32Field("BandwidthExceededCounter", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, true, false, 4),
- 5: TableField("Ipv4ActiveGroupListTable", TableAttributeType, 0x0800, TableInfo{nil, 24}, mapset.NewSetWith(Read), false, false, false, 5),
- 6: TableField("Ipv6ActiveGroupListTable", TableAttributeType, 0x0400, TableInfo{nil, 58}, mapset.NewSetWith(Read), false, true, false, 6),
- },
- Access: CreatedByOlt,
- Support: UnknownSupport,
- }
-}
-
-// NewMulticastSubscriberMonitor (class ID 311) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewMulticastSubscriberMonitor(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*multicastsubscribermonitorBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/octetstring.go b/vendor/github.com/opencord/omci-lib-go/generated/octetstring.go
deleted file mode 100644
index 09e6eb8..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/octetstring.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// OctetStringClassID is the 16-bit ID for the OMCI
-// Managed entity Octet string
-const OctetStringClassID ClassID = ClassID(307)
-
-var octetstringBME *ManagedEntityDefinition
-
-// OctetString (class ID #307)
-// The octet string is modelled on the large string ME. The large string is constrained to
-// printable characters because it uses null as a trailing delimiter. The octet string has a length
-// attribute and is therefore suitable for arbitrary sequences of bytes.
-//
-// Instances of this ME are created and deleted by the OLT. To use this ME, the OLT instantiates
-// the octet string ME and then points to the created ME from other ME instances. Systems that
-// maintain the octet string should ensure that the octet string ME is not deleted while it is
-// still linked.
-//
-// Relationships
-// An instance of this ME may be cited by any ME that requires an octet string that can exceed
-// 25-bytes in length.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. The values 0 and
-// 0xFFFF are reserved. (R, setbycreate) (mandatory) (2-bytes)
-//
-// Length
-// Length: This attribute specifies the number of octets that comprise the sequence of octets. This
-// attribute defaults to 0 to indicate no octet string is defined. The maximum value of this
-// attribute is 375 (15 parts, 25-bytes each). (R,-W) (mandatory) (2-bytes)
-//
-// Part 1, Part 2, Part 3, Part 4, Part 5, Part 6, Part 7, Part 8, Part 9, Part 10, Part 11, Part 12, Part 13, Part 14, Part 15
-// Part 1, Part 2, Part 3, Part 4, Part 5, Part 6, Part 7, Part 8, Part 9, Part 10, Part 11, Part
-// 12, Part 13, Part 14, Part 15: (R,-W) (part 1 mandatory, others optional) (25-bytes * 15
-// attributes)
-//
-type OctetString struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- octetstringBME = &ManagedEntityDefinition{
- Name: "OctetString",
- ClassID: 307,
- MessageTypes: mapset.NewSetWith(
- Create,
- Delete,
- Get,
- Set,
- ),
- AllowedAttributeMask: 0xc000,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
- 1: Uint16Field("Length", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
- 2: MultiByteField("Part1,Part2,Part3,Part4,Part5,Part6,Part7,Part8,Part9,Part10,Part11,Part12,Part13,Part14,Part15", OctetsAttributeType, 0x4000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 2),
- },
- Access: CreatedByOlt,
- Support: UnknownSupport,
- }
-}
-
-// NewOctetString (class ID 307) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewOctetString(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*octetstringBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/onu-g.go b/vendor/github.com/opencord/omci-lib-go/generated/onu-g.go
deleted file mode 100644
index f4aacdc..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/onu-g.go
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// OnuGClassID is the 16-bit ID for the OMCI
-// Managed entity ONU-G
-const OnuGClassID ClassID = ClassID(256)
-
-var onugBME *ManagedEntityDefinition
-
-// OnuG (class ID #256)
-// This ME represents the ONU as equipment. The ONU automatically creates an instance of this ME.
-// It assigns values to read-only attributes according to data within the ONU itself.
-//
-// This ME has evolved from the ONT-G of [ITUT G.984.4].
-//
-// Relationships
-// In ITU-T GTC based PON applications, all other MEs in this Recommendation are related directly
-// or indirectly to the ONU-G entity.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. There is only
-// one instance, number 0. (R) (mandatory) (2-bytes)
-//
-// Vendor Id
-// Vendor ID: This attribute identifies the vendor of the ONU. It is the same as the four most
-// significant bytes of the ONU serial number as specified in the respective transmission
-// convergence (TC) layer specification. (R) (mandatory) (4-bytes)
-//
-// Version
-// Version: This attribute identifies the version of the ONU as defined by the vendor. The
-// character value 0 indicates that version information is not available or applicable. (R)
-// (mandatory) (14-bytes)
-//
-// Serial Number
-// Serial number: The serial number is unique for each ONU. It is defined in the respective TC
-// layer specification and contains the vendor ID and version number. The first four bytes are an
-// ASCII-encoded four-letter vendor ID. The second four bytes are a binary encoded serial number,
-// under the control of the ONU vendor. (R) (mandatory) (8-bytes)
-//
-// Traffic Management Option
-// Upon ME instantiation, the ONU sets this attribute to the value that describes its
-// implementation. The OLT must adapt its model to conform to the ONU's selection. (R) (mandatory)
-// (1-byte)
-//
-// Deprecated
-// Deprecated: This attribute is not used. If it is present, it should be set to 0. (R) (optional)
-// (1-byte)
-//
-// Battery Backup
-// Battery backup: This Boolean attribute controls whether the ONU performs backup battery
-// monitoring (assuming it is capable of doing so). False disables battery alarm monitoring; true
-// enables battery alarm monitoring. (R,-W) (mandatory) (1-byte)
-//
-// Administrative State
-// Administrative state: This attribute locks (1) and unlocks (0) the functions performed by the
-// ONU as an entirety. Administrative state is further described in clause A.1.6. (R,-W)
-// (mandatory) (1-byte)
-//
-// Operational State
-// Operational state: This attribute reports whether the ME is currently capable of performing its
-// function. Valid values are enabled (0) and disabled (1). (R) (optional) (1-byte)
-//
-// Onu Survival Time
-// ONU survival time: This attribute indicates the minimum guaranteed time in milliseconds between
-// the loss of external power and the silence of the ONU. This does not include survival time
-// attributable to a backup battery. The value zero implies that the actual time is not known. (R)
-// (optional) (1-byte)
-//
-// Logical Onu Id
-// Logical ONU ID: This attribute provides a way for the ONU to identify itself. It is a text
-// string, null terminated if it is shorter than 24 bytes, with a null default value. The mechanism
-// for creation or modification of this information is beyond the scope of this Recommendation, but
-// might include, for example, a web page displayed to a user. (R) (optional) (24 bytes)
-//
-// Logical Password
-// Logical password: This attribute provides a way for the ONU to submit authentication
-// credentials. It is a text string, null terminated if it is shorter than 12 bytes, with a null
-// default value. The mechanism for creation or modification of this information is beyond the
-// scope of this Recommendation. (R) (optional) (12-bytes)
-//
-// Credentials Status
-// Other values are reserved.
-//
-// Extended Tc_Layer Options
-// (R) (optional) (2-bytes)
-//
-type OnuG struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- onugBME = &ManagedEntityDefinition{
- Name: "OnuG",
- ClassID: 256,
- MessageTypes: mapset.NewSetWith(
- Get,
- Reboot,
- Set,
- SynchronizeTime,
- Test,
- ),
- AllowedAttributeMask: 0xfff8,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
- 1: MultiByteField("VendorId", StringAttributeType, 0x8000, 4, toOctets("ICAgIA=="), mapset.NewSetWith(Read), false, false, false, 1),
- 2: MultiByteField("Version", StringAttributeType, 0x4000, 14, toOctets("MAAAAAAAAAAAAAAAAAA="), mapset.NewSetWith(Read), false, false, false, 2),
- 3: MultiByteField("SerialNumber", OctetsAttributeType, 0x2000, 8, toOctets("AAAAAAAAAAA="), mapset.NewSetWith(Read), false, false, false, 3),
- 4: ByteField("TrafficManagementOption", EnumerationAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
- 5: ByteField("Deprecated", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, true, true, 5),
- 6: ByteField("BatteryBackup", EnumerationAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
- 7: ByteField("AdministrativeState", EnumerationAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, false, false, 7),
- 8: ByteField("OperationalState", EnumerationAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, true, false, 8),
- 9: ByteField("OnuSurvivalTime", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, true, false, 9),
- 10: MultiByteField("LogicalOnuId", OctetsAttributeType, 0x0040, 24, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"), mapset.NewSetWith(Read), false, true, false, 10),
- 11: MultiByteField("LogicalPassword", OctetsAttributeType, 0x0020, 12, toOctets("AAAAAAAAAAAAAAAA"), mapset.NewSetWith(Read), false, true, false, 11),
- 12: ByteField("CredentialsStatus", EnumerationAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
- 13: Uint16Field("ExtendedTcLayerOptions", BitFieldAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, true, false, 13),
- },
- Access: CreatedByOnu,
- Support: UnknownSupport,
- }
-}
-
-// NewOnuG (class ID 256) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewOnuG(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*onugBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/onu2-g.go b/vendor/github.com/opencord/omci-lib-go/generated/onu2-g.go
deleted file mode 100644
index d9643e9..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/onu2-g.go
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// Onu2GClassID is the 16-bit ID for the OMCI
-// Managed entity ONU2-G
-const Onu2GClassID ClassID = ClassID(257)
-
-var onu2gBME *ManagedEntityDefinition
-
-// Onu2G (class ID #257)
-// This ME contains additional attributes associated with a PON ONU. The ONU automatically creates
-// an instance of this ME. Its attributes are populated according to data within the ONU itself.
-//
-// This ME is the same as the ONT2-G of [ITUT G.984.4], with extensions.
-//
-// Relationships
-// This ME is paired with the ONU-G entity.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. There is only
-// one instance, number 0. (R) (mandatory) (2-bytes)
-//
-// Equipment Id
-// Equipment ID: This attribute may be used to identify the specific type of ONU. In some
-// environments, this attribute may include the common language equipment identification (CLEI)
-// code. (R) (optional) (20-bytes)
-//
-// Optical Network Unit Management And Control Channel Omcc Version
-// (R) (mandatory) (1-byte)
-//
-// Vendor Product Code
-// Vendor product code: This attribute contains a vendor-specific product code for the ONU. (R)
-// (optional) (2-bytes)
-//
-// Security Capability
-// (R) (mandatory) (1-byte)
-//
-// Security Mode
-// Upon ME instantiation, the ONU sets this attribute to 1, AES-128. Attribute value 1 does not
-// imply that any channels are encrypted; that process is negotiated at the PLOAM layer. It only
-// signifies that the advanced encryption standard (AES) with 128-bit keys is the security mode to
-// be used on any channels that the OLT may choose to encrypt. (R,-W) (mandatory) (1-byte)
-//
-// Total Priority Queue Number
-// Total priority queue number: This attribute reports the total number of upstream priority queues
-// that are not associated with a circuit pack, but with the ONU in its entirety. Upon ME
-// instantiation, the ONU sets this attribute to the value that represents its capabilities. (R)
-// (mandatory) (2-bytes)
-//
-// Total Traffic Scheduler Number
-// Total traffic scheduler number: This attribute reports the total number of traffic schedulers
-// that are not associated with a circuit pack, but with the ONU in its entirety. The ONU supports
-// null function, strict priority scheduling and weighted round robin (WRR) from the priority
-// control and guarantee of minimum rate control points of view, respectively. If the ONU has no
-// global traffic schedulers, this attribute is 0. (R) (mandatory) (1-byte)
-//
-// Deprecated
-// Deprecated: This attribute should always be set to 1 by the ONU and ignored by the OLT. (R)
-// (mandatory) (1-byte)
-//
-// Total Gem Port_Id Number
-// Total GEM port-ID number: This attribute reports the total number of GEM port-IDs supported by
-// the ONU. The maximum value is specified in the corresponding TC recommendations. Upon ME
-// instantiation, the ONU sets this attribute to the value that represents its capabilities. (R)
-// (optional) (2-bytes)
-//
-// Sysuptime
-// SysUpTime: This attribute counts 10 ms intervals since the ONU was last initialized. It rolls
-// over to 0 when full (see [IETF RFC 1213]). (R) (optional) (4-bytes)
-//
-// Connectivity Capability
-// (R) (optional) (2 bytes)
-//
-// Current Connectivity Mode
-// (R, W) (optional) (1 byte)
-//
-// Quality Of Service Qos Configuration Flexibility
-// The ME ID of both the T-CONT and traffic scheduler contains a slot number. Even when attributes
-// in the above list are RW, it is never permitted to change the slot number in a reference. That
-// is, configuration flexibility never extends across slots. It is also not permitted to change the
-// directionality of an upstream queue to downstream or vice versa.
-//
-// Priority Queue Scale Factor
-// NOTE 3 - Some legacy implementations may take the queue scale factor from the GEM block length
-// attribute of the ANI-G ME. That option is discouraged in new implementations.
-//
-type Onu2G struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- onu2gBME = &ManagedEntityDefinition{
- Name: "Onu2G",
- ClassID: 257,
- MessageTypes: mapset.NewSetWith(
- Get,
- Set,
- ),
- AllowedAttributeMask: 0xfffc,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
- 1: MultiByteField("EquipmentId", StringAttributeType, 0x8000, 20, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAA="), mapset.NewSetWith(Read), false, true, false, 1),
- 2: ByteField("OpticalNetworkUnitManagementAndControlChannelOmccVersion", EnumerationAttributeType, 0x4000, 164, mapset.NewSetWith(Read), true, false, false, 2),
- 3: Uint16Field("VendorProductCode", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, true, false, 3),
- 4: ByteField("SecurityCapability", EnumerationAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
- 5: ByteField("SecurityMode", EnumerationAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
- 6: Uint16Field("TotalPriorityQueueNumber", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
- 7: ByteField("TotalTrafficSchedulerNumber", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
- 8: ByteField("Deprecated", UnsignedIntegerAttributeType, 0x0100, 1, mapset.NewSetWith(Read), false, false, true, 8),
- 9: Uint16Field("TotalGemPortIdNumber", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, true, false, 9),
- 10: Uint32Field("Sysuptime", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, true, false, 10),
- 11: Uint16Field("ConnectivityCapability", BitFieldAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, true, false, 11),
- 12: ByteField("CurrentConnectivityMode", BitFieldAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
- 13: Uint16Field("QualityOfServiceQosConfigurationFlexibility", BitFieldAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, true, false, 13),
- 14: Uint16Field("PriorityQueueScaleFactor", UnsignedIntegerAttributeType, 0x0004, 1, mapset.NewSetWith(Read, Write), false, true, false, 14),
- },
- Access: CreatedByOnu,
- Support: UnknownSupport,
- }
-}
-
-// NewOnu2G (class ID 257) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewOnu2G(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*onu2gBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/onudynamicpowermanagementcontrol.go b/vendor/github.com/opencord/omci-lib-go/generated/onudynamicpowermanagementcontrol.go
deleted file mode 100644
index da0180f..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/onudynamicpowermanagementcontrol.go
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// OnuDynamicPowerManagementControlClassID is the 16-bit ID for the OMCI
-// Managed entity ONU dynamic power management control
-const OnuDynamicPowerManagementControlClassID ClassID = ClassID(336)
-
-var onudynamicpowermanagementcontrolBME *ManagedEntityDefinition
-
-// OnuDynamicPowerManagementControl (class ID #336)
-// This ME models the ONU's ability to enter power conservation modes in cooperation with the OLT
-// in an ITU-T G.987 system. [ITUT G.987.3] originally specified two alternative modes, doze and
-// cyclic sleep. The subsequent revision of [ITUT G.987.3] simplified the specification providing a
-// single power conservation mode, watchful sleep.
-//
-// An ONU that supports power conservation modes automatically creates an instance of this ME.
-//
-// Relationships
-// One instance of this ME is associated with the ONU ME.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. There is only
-// one instance, number 0. (R) (mandatory) (2-bytes)
-//
-// Power Reduction Management Capability
-// 5..255 Reserved
-//
-// Power Reduction Management Mode
-// Power reduction management mode: This attribute enables one or more of the ONU's managed power
-// conservation modes. It is a bit map in which the bit value 0 disables the mode, while the value
-// 1 enables the mode. Bit assignments are the same as those of the power reduction management
-// capability attribute. The default value of each bit is 0. (R,-W) (mandatory) (1-byte)
-//
-// Itransinit
-// Itransinit: This attribute is the ONU vendor's statement of the complete transceiver
-// initialization time: the worst-case time required for the ONU to regain full functionality when
-// leaving the asleep state in cyclic sleep mode or low-power state in watchful sleep mode (i.e.,
-// turning on both the receiver and the transmitter and acquiring synchronization to the downstream
-// flow), measured in units of 125-us frames. The value zero indicates that the sleeping ONU can
-// respond to a bandwidth grant without delay. (R) (mandatory) (2-bytes)
-//
-// Itxinit
-// Itxinit: This attribute is the ONU vendor's statement of the transmitter initialization time:
-// the time required for the ONU to regain full functionality when leaving the listen state (i.e.,
-// turning on the transmitter), measured in units of 125-us frames. The value zero indicates that
-// the dozing ONU can respond to a bandwidth grant without delay. If watchful sleep is enabled, the
-// ONU ignores this attribute. (R) (mandatory) (2 bytes)
-//
-// Maximum Sleep Interval
-// Maximum sleep interval: The Isleep/Ilowpower attribute specifies the maximum time the ONU spends
-// in its asleep, listen, or low-power states, as a count of 125-us frames. Local or remote events
-// may truncate the ONU's sojourn in these states. The default value of this attribute is 0. (R,-W)
-// (mandatory) (4-bytes)
-//
-// Maximum Receiver_Off Interval
-// Maximum receiver-off interval: The Irxoff attribute specifies the maximum time the OLT can
-// afford to wait from the moment it decides to wake up an ONU in the low-power state of the
-// watchful sleep mode until the ONU is fully operational, specified as a count of 125-us frames.
-// (R,-W) (mandatory) (4-bytes)
-//
-// Minimum Aware Interval
-// Minimum aware interval: The Iaware attribute specifies the time the ONU spends in its aware
-// state, as a count of 125-us frames, before it re-enters asleep or listen states. Local or remote
-// events may independently cause the ONU to enter an active state rather than returning to a sleep
-// state. The default value of this attribute is 0. (R,-W) (mandatory) (4-bytes)
-//
-// Minimum Active Held Interval
-// Minimum active held interval: The Ihold attribute specifies the minimum time during which the
-// ONU remains in the active held state, as a count of 125-us frames. Its initial value is zero.
-// (R, W) (mandatory) (2-bytes)
-//
-// Maximum Sleep Interval Extension
-// (R,-W) (optional) (8-bytes)
-//
-// Ethernet Passive Optical Network Epon Capability Extension
-// - Configurations: ackEnable configuration = enable, Sleep indication configuration = disable,
-// Early wake-up configuration = enable
-//
-// Epon Setup Extension
-// (R,-W) (optional) (1-byte)
-//
-// Missing Consecutive Bursts Threshold
-// Missing consecutive bursts threshold: The Clobi attribute specifies the maximum number of
-// missing consecutive scheduled bursts from the ONU that the OLT is willing to tolerate without
-// raising an alarm. The value of this attribute defaults to 4. (R,-W) (mandatory) (4-bytes)
-//
-type OnuDynamicPowerManagementControl struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- onudynamicpowermanagementcontrolBME = &ManagedEntityDefinition{
- Name: "OnuDynamicPowerManagementControl",
- ClassID: 336,
- MessageTypes: mapset.NewSetWith(
- Get,
- Set,
- ),
- AllowedAttributeMask: 0xfff0,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
- 1: ByteField("PowerReductionManagementCapability", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
- 2: ByteField("PowerReductionManagementMode", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
- 3: Uint16Field("Itransinit", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
- 4: Uint16Field("Itxinit", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
- 5: Uint32Field("MaximumSleepInterval", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
- 6: Uint32Field("MaximumReceiverOffInterval", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
- 7: Uint32Field("MinimumAwareInterval", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, false, false, 7),
- 8: Uint16Field("MinimumActiveHeldInterval", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, false, false, 8),
- 9: Uint64Field("MaximumSleepIntervalExtension", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9),
- 10: ByteField("EthernetPassiveOpticalNetworkEponCapabilityExtension", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, true, false, 10),
- 11: ByteField("EponSetupExtension", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11),
- 12: Uint32Field("MissingConsecutiveBurstsThreshold", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, false, false, 12),
- },
- Access: CreatedByOnu,
- Support: UnknownSupport,
- }
-}
-
-// NewOnuDynamicPowerManagementControl (class ID 336) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewOnuDynamicPowerManagementControl(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*onudynamicpowermanagementcontrolBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/physicalpathterminationpointpotsuni.go b/vendor/github.com/opencord/omci-lib-go/generated/physicalpathterminationpointpotsuni.go
deleted file mode 100644
index bc12ee8..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/physicalpathterminationpointpotsuni.go
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// PhysicalPathTerminationPointPotsUniClassID is the 16-bit ID for the OMCI
-// Managed entity Physical path termination point POTS UNI
-const PhysicalPathTerminationPointPotsUniClassID ClassID = ClassID(53)
-
-var physicalpathterminationpointpotsuniBME *ManagedEntityDefinition
-
-// PhysicalPathTerminationPointPotsUni (class ID #53)
-// This ME represents a POTS UNI in the ONU, where a physical path terminates and physical path
-// level functions (analogue telephony) are performed.
-//
-// The ONU automatically creates an instance of this ME per port as follows.
-//
-// o When the ONU has POTS ports built into its factory configuration.
-//
-// o When a cardholder is provisioned to expect a circuit pack of the POTS type.
-//
-// o When a cardholder provisioned for plug-and-play is equipped with a circuit pack of the POTS
-// type. Note that the installation of a plug-and-play card may indicate the presence of POTS ports
-// via equipment ID as well as type, and indeed may cause the ONU to instantiate a port-mapping
-// package that specifies POTS ports.
-//
-// The ONU automatically deletes instances of this ME when a cardholder is neither provisioned to
-// expect a POTS circuit pack, nor is it equipped with a POTS circuit pack.
-//
-// Relationships
-// An instance of this ME is associated with each real or pre-provisioned POTS port. Either a SIP
-// or a VoIP voice CTP links to the POTS UNI. Status is available from a VoIP line status ME, and
-// RTP and call control PM may be collected on this point.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. This 2-byte
-// number indicates the physical position of the UNI. The first byte is the slot ID (defined in
-// clause 9.1.5). The second byte is the port ID, with the range 1..255. (R) (mandatory) (2-bytes)
-//
-// Administrative State
-// When the administrative state is set to lock, all user functions of this UNI are blocked, and
-// alarms, TCAs and AVCs for this ME and all dependent MEs are no longer generated. Selection of a
-// default value for this attribute is outside the scope of this Recommendation. (R, W) (mandatory)
-// (1 byte)
-//
-// Deprecated
-// Deprecated: This attribute is not used and should not be supported. (R,-W) (optional) (2-bytes)
-//
-// Arc
-// ARC: See clause A.1.4.3. (R,-W) (optional) (1-byte)
-//
-// Arc Interval
-// ARC interval: See clause A.1.4.3. (R,-W) (optional) (1-byte)
-//
-// Impedance
-// where C1, R1, and R2 are related as shown in Figure 9.9.1-1. Upon ME instantiation, the ONU sets
-// this attribute to 0. (R,-W) (optional) (1-byte)
-//
-// Transmission Path
-// Transmission path: This attribute allows setting the POTS UNI either to full-time on-hook
-// transmission (0) or part-time on-hook transmission (1). Upon ME instantiation, the ONU sets this
-// attribute to 0. (R,-W) (optional) (1-byte)
-//
-// Rx Gain
-// Rx gain: This attribute specifies a gain value for the received signal in the form of a 2s
-// complement number. Valid values are -120 (12.0-dB) to 60 (+6.0-dB). The direction of the
-// affected signal is in the D to A direction, towards the telephone set. Upon ME instantiation,
-// the ONU sets this attribute to 0. (R, W) (optional) (1 byte)
-//
-// Tx Gain
-// Tx gain: This attribute specifies a gain value for the transmit signal in the form of a 2s
-// complement number. Valid values are -120 (12.0-dB) to 60 (+6.0-dB). The direction of the
-// affected signal is in the A to D direction, away from the telephone set. Upon ME instantiation,
-// the ONU sets this attribute to 0. (R, W) (optional) (1 byte)
-//
-// Operational State
-// Operational state: This attribute indicates whether the ME is capable of performing its
-// function. Valid values are enabled (0) and disabled (1). (R) (optional) (1-byte)
-//
-// Hook State
-// Hook state: This attribute indicates the current state of the subscriber line: 0-= on hook, 1-=
-// off hook (R) (optional) (1-byte)
-//
-// Pots Holdover Time
-// POTS holdover time: This attribute determines the time during which the POTS loop voltage is
-// held up when a LOS or softswitch connectivity is detected (please refer to the following table
-// for description of behaviours).. After the specified time elapses, the ONU drops the loop
-// voltage, and may thereby cause premises intrusion alarm or fire panel circuits to go active.
-// When the ONU ranges successfully on the PON or softswitch connectivity is restored, it restores
-// the POTS loop voltage immediately and resets the timer to zero. The attribute is expressed in
-// seconds. The default value 0 selects the vendor's factory policy. (R,-W) (optional) (2-bytes)
-//
-// Nominal Feed Voltage
-// Nominal feed voltage: This attribute indicates the designed nominal feed voltage of the POTS
-// loop. It is an absolute value with resolution 1-V. This attribute does not represent the actual
-// voltage measured on the loop, which is available through the test command. (R,-W) (optional)
-// (1-byte)
-//
-// Loss Of Softswitch
-// Loss of softswitch: This Boolean attribute controls whether the T/R holdover initiation
-// criteria. False disables loss of softswitch connectivity detection as criteria for initiating
-// the POTS holdover timer. True enables loss of softswitch connectivity detection as criteria for
-// initiating the POTS holdover timer. This attribute is optional (if not implemented, the POTS
-// holdover time is triggered on a LOS when POTS holdover is greater than zero). (R,-W) (optional)
-// (1-byte)
-//
-type PhysicalPathTerminationPointPotsUni struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- physicalpathterminationpointpotsuniBME = &ManagedEntityDefinition{
- Name: "PhysicalPathTerminationPointPotsUni",
- ClassID: 53,
- MessageTypes: mapset.NewSetWith(
- Get,
- Set,
- Test,
- ),
- AllowedAttributeMask: 0xfff8,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
- 1: ByteField("AdministrativeState", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), true, false, false, 1),
- 2: Uint16Field("Deprecated", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, true, true, 2),
- 3: ByteField("Arc", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), true, true, false, 3),
- 4: ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
- 5: ByteField("Impedance", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, true, false, 5),
- 6: ByteField("TransmissionPath", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, true, false, 6),
- 7: ByteField("RxGain", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, true, false, 7),
- 8: ByteField("TxGain", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, true, false, 8),
- 9: ByteField("OperationalState", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), true, true, false, 9),
- 10: ByteField("HookState", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, true, false, 10),
- 11: Uint16Field("PotsHoldoverTime", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11),
- 12: ByteField("NominalFeedVoltage", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
- 13: ByteField("LossOfSoftswitch", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, true, false, 13),
- },
- Access: CreatedByOnu,
- Support: UnknownSupport,
- }
-}
-
-// NewPhysicalPathTerminationPointPotsUni (class ID 53) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewPhysicalPathTerminationPointPotsUni(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*physicalpathterminationpointpotsuniBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/physicalpathterminationpointreuni.go b/vendor/github.com/opencord/omci-lib-go/generated/physicalpathterminationpointreuni.go
deleted file mode 100644
index 462fad6..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/physicalpathterminationpointreuni.go
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// PhysicalPathTerminationPointReUniClassID is the 16-bit ID for the OMCI
-// Managed entity Physical path termination point RE UNI
-const PhysicalPathTerminationPointReUniClassID ClassID = ClassID(314)
-
-var physicalpathterminationpointreuniBME *ManagedEntityDefinition
-
-// PhysicalPathTerminationPointReUni (class ID #314)
-// This ME represents an S'/R' interface in a mid-span PON RE that supports OEO regeneration in at
-// least one direction, where physical paths terminate and physical path level functions are
-// performed (transmit or receive).
-//
-// Such an RE automatically creates an instance of this ME for each S'/R' interface port as
-// follows.
-//
-// o When the RE has mid-span PON RE UNI interface ports built into its factory configuration.
-//
-// o When a cardholder is provisioned to expect a circuit pack of the mid-span PON RE UNI type.
-//
-// o When a cardholder provisioned for plug-and-play is equipped with a circuit pack of the midspan
-// PON RE UNI type. Note that the installation of a plug-and-play card may indicate the presence of
-// a mid-span PON RE UNI port via equipment ID as well as its type attribute, and indeed may cause
-// the management ONU to instantiate a port-mapping package to specify the ports precisely.
-//
-// The management ONU automatically deletes instances of this ME when a cardholder is neither
-// provisioned to expect a mid-span PON RE UNI circuit pack, nor is it equipped with a mid-span PON
-// RE UNI circuit pack.
-//
-// As illustrated in Figure 8.2.10-3, a PPTP RE UNI may share the physical port with an RE upstream
-// amplifier. The ONU declares a shared configuration through the port-mapping package combined
-// port table, whose structure defines one ME as the master. It is recommended that the PPTP RE UNI
-// be the master, with the RE upstream amplifier as a secondary ME.
-//
-// The administrative state, operational state and ARC attributes of the master ME override similar
-// attributes in secondary MEs associated with the same port. In the secondary ME, these attributes
-// are present, but cause no action when written and have undefined values when read. The RE
-// upstream amplifier should use its provisionable upstream alarm thresholds and should declare
-// upstream alarms as necessary; other isomorphic alarms should be declared by the PPTP RE UNI. The
-// test action should be addressed to the master ME.
-//
-// Relationships
-// An instance of this ME is associated with each instance of a mid-span PON RE S'/R' physical
-// interface of an RE that includes OEO regeneration in either direction, and it may also be
-// associated with an RE upstream amplifier.
-//
-// Attributes
-// Managed Entity Id
-// NOTE 1 - This ME ID may be identical to that of an RE upstream amplifier if it shares the same
-// physical slot and port.
-//
-// Administrative State
-// NOTE 2 - Administrative lock of a PPTP RE UNI results in loss of signal to any downstream ONUs.
-//
-// Operational State
-// Operational state: This attribute indicates whether the ME is capable of performing its
-// function. Valid values are enabled (0) and disabled (1). (R) (optional) (1-byte)
-//
-// Arc
-// ARC: See clause A.1.4.3. (R,-W) (optional) (1-byte)
-//
-// Arc Interval
-// ARC interval: See clause A.1.4.3. (R,-W) (optional) (1-byte)
-//
-// Re Ani_G Pointer
-// RE ANI-G pointer: This attribute points to an RE ANI-G instance. (R,-W) (mandatory) (2-bytes)
-//
-// Total Optical Receive Signal Level Table
-// Total optical receive signal level table: This table attribute reports a series of measurements
-// of time averaged received upstream optical signal power. The measurement circuit should have a
-// temporal response similar to a simple 1-pole low pass filter, with an effective time constant of
-// the order of a GTC frame time. Each table entry has a 2-byte frame counter field (most
-// significant end), and a 2-byte power measurement field. The frame counter field contains the
-// least significant 16-bits of the superframe counter received closest to the time of the
-// measurement. The power measurement field is a 2s complement integer referred to 1-mW (i.e.,
-// dBm), with 0.002-dB granularity. The RE equipment should add entries to this table as frequently
-// as is reasonable. The RE should clear the table once it is read by the OLT. (R) (optional) (4-*
-// N-bytes, where N is the number of measurements present.)
-//
-// Per Burst Receive Signal Level Table
-// Per burst receive signal level table: This table attribute reports the most recent measurement
-// of received burst upstream optical signal power. Each table entry has a 2-byte ONU-ID field
-// (most significant end), and a 2-byte power measurement field. The power measurement field is a
-// 2s complement integer referred to 1-mW (i.e.,-dBm), with 0.002-dB granularity. (R) (optional)
-// (4-* N-bytes, where N is the number of distinct ONUs connected to the S'/R' interface.)
-//
-// Lower Receive Optical Threshold
-// Lower receive optical threshold: This attribute specifies the optical level that the RE uses to
-// declare the burst mode low received optical power alarm. Valid values are -127-dBm (coded as
-// 254) to 0-dBm (coded as 0) in 0.5-dB increments. The default value 0xFF selects the RE's
-// internal policy. (R,-W) (optional) (1-byte)
-//
-// Upper Receive Optical Threshold
-// Upper receive optical threshold: This attribute specifies the optical level that the RE uses to
-// declare the burst mode high optical power alarm. Valid values are -127-dBm (coded as 254) to
-// 0-dBm (coded as 0) in 0.5-dB increments. The default value 0xFF selects the RE's internal
-// policy. (R,-W) (optional) (1-byte)
-//
-// Transmit Optical Level
-// Transmit optical level: This attribute reports the current measurement of the downstream mean
-// optical launch power. Its value is a 2s complement integer referred to 1-mW (i.e., dBm), with
-// 0.002-dB granularity. (R) (optional) (2-bytes)
-//
-// Lower Transmit Power Threshold
-// Lower transmit power threshold: This attribute specifies the downstream minimum mean optical
-// launch power at the S'/R' interface that the RE uses to declare the low transmit optical power
-// alarm. Its value is a 2s complement integer referred to 1-mW (i.e., dBm), with 0.5-dB
-// granularity. The default value 0x7F selects the RE's internal policy. (R,-W) (optional) (1-byte)
-//
-// Upper Transmit Power Threshold
-// Upper transmit power threshold: This attribute specifies the downstream maximum mean optical
-// launch power at the S'/R' interface that the RE uses to declare the high transmit optical power
-// alarm. Its value is a 2s complement integer referred to 1-mW (i.e., dBm), with 0.5-dB
-// granularity. The default value 0x7F selects the RE's internal policy. (R,-W) (optional) (1-byte)
-//
-// A Dditional Preamble
-// Additional preamble: This attribute indicates the number of bytes of PLOu preamble that are
-// unavoidably consumed while passing the RE. (R) (mandatory) (1-byte)
-//
-// A Dditional Guard Time
-// Additional guard time: This attribute indicates the number of bytes of extra guard time that are
-// needed to ensure correct operation with the RE. (R) (mandatory) (1-byte)
-//
-type PhysicalPathTerminationPointReUni struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- physicalpathterminationpointreuniBME = &ManagedEntityDefinition{
- Name: "PhysicalPathTerminationPointReUni",
- ClassID: 314,
- MessageTypes: mapset.NewSetWith(
- Get,
- GetNext,
- Set,
- ),
- AllowedAttributeMask: 0xfffc,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
- 1: ByteField("AdministrativeState", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
- 2: ByteField("OperationalState", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, true, false, 2),
- 3: ByteField("Arc", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), true, true, false, 3),
- 4: ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
- 5: Uint16Field("ReAniGPointer", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
- 6: TableField("TotalOpticalReceiveSignalLevelTable", TableAttributeType, 0x0400, TableInfo{nil, 4}, mapset.NewSetWith(Read), false, true, false, 6),
- 7: TableField("PerBurstReceiveSignalLevelTable", TableAttributeType, 0x0200, TableInfo{nil, 4}, mapset.NewSetWith(Read), false, true, false, 7),
- 8: ByteField("LowerReceiveOpticalThreshold", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, true, false, 8),
- 9: ByteField("UpperReceiveOpticalThreshold", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9),
- 10: Uint16Field("TransmitOpticalLevel", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, true, false, 10),
- 11: ByteField("LowerTransmitPowerThreshold", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, true, false, 11),
- 12: ByteField("UpperTransmitPowerThreshold", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
- 13: ByteField("ADditionalPreamble", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
- 14: ByteField("ADditionalGuardTime", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
- },
- Access: CreatedByOnu,
- Support: UnknownSupport,
- Alarms: AlarmMap{
- 0: "Low received optical power",
- 1: "High received optical power",
- 2: "Low transmit optical power",
- 3: "High transmit optical power",
- 4: "High laser bias current",
- 5: "S'/R' LOS",
- },
- }
-}
-
-// NewPhysicalPathTerminationPointReUni (class ID 314) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewPhysicalPathTerminationPointReUni(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*physicalpathterminationpointreuniBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/physicalpathterminationpointvideoani.go b/vendor/github.com/opencord/omci-lib-go/generated/physicalpathterminationpointvideoani.go
deleted file mode 100644
index 39d03e6..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/physicalpathterminationpointvideoani.go
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// PhysicalPathTerminationPointVideoAniClassID is the 16-bit ID for the OMCI
-// Managed entity Physical path termination point video ANI
-const PhysicalPathTerminationPointVideoAniClassID ClassID = ClassID(90)
-
-var physicalpathterminationpointvideoaniBME *ManagedEntityDefinition
-
-// PhysicalPathTerminationPointVideoAni (class ID #90)
-// This ME represents an RF video ANI in the ONU, where physical paths terminate and physical path
-// level functions are performed.
-//
-// The ONU automatically creates an instance of this ME per port as follows.
-//
-// o When the ONU has video ANI ports built into its factory configuration.
-//
-// o When a cardholder is provisioned to expect a circuit pack of the video ANI type.
-//
-// o When a cardholder provisioned for plug-and-play is equipped with a circuit pack of the video
-// ANI type. Note that the installation of a plug-and-play card may indicate the presence of video
-// ANI ports via equipment ID as well as its type, and indeed may cause the ONU to instantiate a
-// port-mapping package that specifies video ANI ports.
-//
-// The ONU automatically deletes instances of this ME when a cardholder is neither provisioned to
-// expect a video ANI circuit pack, nor is it equipped with a video ANI circuit pack.
-//
-// Relationships
-// An instance of this ME is associated with each instance of a real or pre-provisioned video ANI
-// port.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. This 2-byte
-// number indicates the physical position of the ANI. The first byte is the slot ID (defined in
-// clause 9.1.5). The second byte is the port ID, with the range 1..255. (R) (mandatory) (2-bytes)
-//
-// Administrative State
-// Administrative state: This attribute locks (1) and unlocks (0) the functions performed by this
-// ME. Administrative state is further described in clause-A.1.6. (R,-W) (mandatory) (1-byte)
-//
-// Operational State
-// Operational state: This attribute indicates whether the ME is capable of performing its
-// function. Valid values are enabled (0) and disabled (1). (R) (optional) (1-byte)
-//
-// Arc
-// ARC: See clause A.1.4.3. (R,-W) (optional) (1-byte)
-//
-// Arc Interval
-// ARC interval: See clause A.1.4.3. (R,-W) (optional) (1-byte)
-//
-// Frequency Range Low
-// (R) (mandatory) (1-byte)
-//
-// Frequency Range High
-// (R) (mandatory) (1-byte)
-//
-// Signal Capability
-// (R) (mandatory) (1-byte)
-//
-// Optical Signal Level
-// (R) (optional) (1-byte)
-//
-// Pilot Signal Level
-// (R) (optional) (1-byte)
-//
-// Signal Level Min
-// Signal level min: This attribute indicates the minimum optical RF power per channel that results
-// in a CNR of 47-dBc for a channel of 4.5 MHz bandwidth at a receive optical power of -5-dBm. The
-// unit of this attribute is decibel-microwatt optical. (R) (mandatory) (1-byte)
-//
-// Signal Level Max
-// Signal level max: This attribute indicates the maximum optical RF power per channel that results
-// in a CTB of -57-dBc for an 80-channel ensemble of carriers at a perchannel optical modulation
-// index (OMI) of 3.5%. The unit of this attribute is decibel-microwatt optical. (R) (mandatory)
-// (1-byte)
-//
-// Pilot Frequency
-// (R,-W) (optional) (4-bytes)
-//
-// Agc Mode
-// (R,-W) (optional) (1-byte)
-//
-// Agc Setting
-// (R,-W) (optional) (1-byte)
-//
-// Video Lower Optical Threshold
-// NOTE - Because the power measurement returned in the optical signal level attribute has a
-// resolution of 1-dB, it is possible that the measured value could appear to be in-range, even
-// though an out-of-range alarm has been declared against a threshold with 0.1-dB resolution.
-//
-// Video Upper Optical Threshold
-// Video upper optical threshold: This attribute specifies the optical level used to declare the
-// video OOR high alarm. Valid values are -12 to +6-dBm in 0.1-dB increments, represented as a 2s
-// complement integer. (Coding -120 to +60, 0x00-= 0-dBm, 0x88-= -12.0-dBm, etc.) Upon ME
-// instantiation, the ONU sets this attribute to 0x19 (+2.5-dBm). (R,-W) (optional) (1-byte)
-//
-type PhysicalPathTerminationPointVideoAni struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- physicalpathterminationpointvideoaniBME = &ManagedEntityDefinition{
- Name: "PhysicalPathTerminationPointVideoAni",
- ClassID: 90,
- MessageTypes: mapset.NewSetWith(
- Get,
- Set,
- ),
- AllowedAttributeMask: 0xffff,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
- 1: ByteField("AdministrativeState", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
- 2: ByteField("OperationalState", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), true, true, false, 2),
- 3: ByteField("Arc", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), true, true, false, 3),
- 4: ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
- 5: ByteField("FrequencyRangeLow", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
- 6: ByteField("FrequencyRangeHigh", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
- 7: ByteField("SignalCapability", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
- 8: ByteField("OpticalSignalLevel", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, true, false, 8),
- 9: ByteField("PilotSignalLevel", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, true, false, 9),
- 10: ByteField("SignalLevelMin", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
- 11: ByteField("SignalLevelMax", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
- 12: Uint32Field("PilotFrequency", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
- 13: ByteField("AgcMode", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, true, false, 13),
- 14: ByteField("AgcSetting", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), false, true, false, 14),
- 15: ByteField("VideoLowerOpticalThreshold", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read, Write), false, true, false, 15),
- 16: ByteField("VideoUpperOpticalThreshold", UnsignedIntegerAttributeType, 0x0001, 0, mapset.NewSetWith(Read, Write), false, true, false, 16),
- },
- Access: CreatedByOnu,
- Support: UnknownSupport,
- Alarms: AlarmMap{
- 0: "Video LOS",
- 1: "Video OOR low",
- 2: "Video OOR high",
- },
- }
-}
-
-// NewPhysicalPathTerminationPointVideoAni (class ID 90) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewPhysicalPathTerminationPointVideoAni(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*physicalpathterminationpointvideoaniBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/priorityqueue.go b/vendor/github.com/opencord/omci-lib-go/generated/priorityqueue.go
deleted file mode 100644
index 4022649..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/priorityqueue.go
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// PriorityQueueClassID is the 16-bit ID for the OMCI
-// Managed entity Priority queue
-const PriorityQueueClassID ClassID = ClassID(277)
-
-var priorityqueueBME *ManagedEntityDefinition
-
-// PriorityQueue (class ID #277)
-// NOTE 1 - In [ITU-T G.984.4], this is called a priority queue-G.
-//
-// This ME specifies the priority queue used by a GEM port network CTP in the upstream direction.
-// The upstream priority queue ME is also related to a T-CONT ME. By default, this relationship is
-// fixed by the ONU hardware architecture, but some ONUs may also permit the relationship to be
-// configured through the OMCI, as indicated by the QoS configuration flexibility attribute of the
-// ONU2G ME.
-//
-// In the downstream direction, priority queues are associated with UNIs. Again, the association is
-// fixed by default, but some ONUs may permit the association to be configured through the OMCI.
-//
-// If an ONU as a whole contains priority queues, it instantiates these queues autonomously.
-// Priority queues may also be localized to pluggable circuit packs, in which case the ONU creates
-// and deletes them in accordance with circuit pack pre-provisioning and the equipped
-// configuration.
-//
-// The OLT can find all the queues by reading the priority queue ME instances. If the OLT tries to
-// retrieve a non-existent priority queue, the ONU denies the get action with an error indication.
-//
-// See also Appendix II.
-//
-// Priority queues can exist in the ONU core and circuit packs serving both UNI and ANI functions.
-// Therefore, they can be indirectly created and destroyed through cardholder provisioning actions.
-//
-// In the upstream direction, the weight attribute permits the configuring of an optional traffic
-// scheduler. Several attributes support back pressure operation, whereby a back-pressure signal is
-// sent backwards and causes the attached terminal to temporarily suspend sending data.
-//
-// In the downstream direction, strict priority discipline among the queues serving a given UNI is
-// the default, with priorities established through the related port attribute. If two or more non-
-// empty queues have the same priority, capacity is allocated among them in proportion to their
-// weights. Note that the details of the downstream model differ from those of the upstream model.
-//
-// The yellow packet drop thresholds specify the drop probability for a packet that has been marked
-// yellow (drop eligible) by a traffic descriptor or by external equipment such as a residential
-// gateway (RG). If the current average queue occupancy is less than the minimum threshold, the
-// yellow packet drop probability is zero. If the current average queue occupancy is greater than
-// or equal to the maximum threshold, the yellow packet drop probability is one. The yellow drop
-// probability increases linearly between 0 and max_p as the current average queue occupancy
-// increases from the minimum to the maximum threshold.
-//
-// The same model can be configured for green packets, those regarded as being within the traffic
-// contract.
-//
-// Drop precedence colour marking indicates the method by which a packet is marked as drop eligible
-// (yellow). For discard eligibility indicator (DEI) and priority code point (PCP) marking, a drop
-// eligible indicator is equivalent to yellow colour; otherwise, the colour is green. For
-// differentiated services code point (DSCP) assured forwarding (AF) marking, the lowest drop
-// precedence is equivalent to green; otherwise, the colour is yellow.
-//
-// Relationships
-// One or more instances of this ME are associated with the ONU-G ME to model upstream priority
-// queues if the traffic management option attribute in the ONU-G ME is 0 or 2.//// One or more instances of this ME are associated with a PPTP UNI ME as downstream priority
-// queues. Downstream priority queues may or may not be provided for a virtual Ethernet interface
-// point (VEIP).
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. The MSB
-// represents the direction (1: upstream, 0:-downstream). The 15 LSBs represent a queue ID. The
-// queue ID is numbered in ascending order by the ONU itself. It is strongly encouraged that the
-// queue ID be formulated to simplify finding related queues. One way to do this is to number the
-// queues such that the related port attributes are in ascending order (for the downstream and
-// upstream queues separately). The range of downstream queue ids is 0 to 0x7FFF and the range of
-// upstream queue ids is 0x8000 to 0xFFFF. (R) (mandatory) (2-bytes)
-//
-// Queue Configuration Option
-// Queue configuration option: This attribute identifies the buffer partitioning policy. The value
-// 1 means that several queues share one buffer of maximum queue size, while the value 0 means that
-// each queue has an individual buffer of maximum queue size. (R) (mandatory) (1-byte)
-//
-// Maximum Queue Size
-// NOTE 2 - In this and the other similar attributes of the priority queue ME, some legacy
-// implementations may take the queue scale factor from the GEM block length attribute of the ANI-G
-// ME. This option is discouraged in new implementations.
-//
-// Allocated Queue Size
-// Allocated queue size: This attribute identifies the allocated size of this queue, in bytes,
-// scaled by the priority queue scale factor attribute of the ONU2G. (R, W) (mandatory) (2 bytes)
-//
-// Discard_Block Counter Reset Interval
-// Discard-block counter reset interval: This attribute represents the interval in milliseconds at
-// which the counter resets itself. (R,-W) (optional) (2-bytes)
-//
-// Threshold Value For Discarded Blocks Due To Buffer Overflow
-// Threshold value for discarded blocks due to buffer overflow: This attribute specifies the
-// threshold for the number of bytes (scaled by the priority queue scale factor attribute of the
-// ONU2G) discarded on this queue due to buffer overflow. Its value controls the declaration of the
-// block loss alarm. (R, W) (optional) (2-bytes)
-//
-// Related Port
-// If flexible configuration is not supported, the ONU should reject an attempt to set the related
-// port with a parameter error result-reason code.
-//
-// Traffic Scheduler Pointer
-// The ONU should reject an attempt to violate these conditions with a parameter error result-
-// reason code.
-//
-// Weight
-// Weight: This attribute represents weight for WRR scheduling. At a given priority level, capacity
-// is distributed to non-empty queues in proportion to their weights. In the upstream direction,
-// this weight is meaningful if several priority queues are associated with a traffic scheduler or
-// T-CONT whose policy is WRR. In the downstream direction, this weight is used by a UNI in a WRR
-// fashion. Upon ME instantiation, the ONU sets this attribute to 1. (R,-W) (mandatory) (1-byte)
-//
-// Back Pressure Operation
-// Back pressure operation: This attribute enables (0) or disables (1) back pressure operation. Its
-// default value is 0. (R,-W) (mandatory) (2-bytes)
-//
-// Back Pressure Time
-// Back pressure time: This attribute specifies the duration in microseconds of the backpressure
-// signal. It can be used as a pause time for an Ethernet UNI. Upon ME instantiation, the ONU sets
-// this attribute to 0. (R,-W) (mandatory) (4-bytes)
-//
-// Back Pressure Occur Queue Threshold
-// Back pressure occur queue threshold: This attribute identifies the threshold queue occupancy, in
-// bytes, scaled by the priority queue scale factor attribute of the ONU2G, to start sending a
-// back-pressure signal. (R, W) (mandatory) (2-bytes)
-//
-// Back Pressure Clear Queue Threshold
-// Back pressure clear queue threshold: This attribute identifies the threshold queue occupancy, in
-// bytes, scaled by the priority queue scale factor attribute of the ONU2G, to stop sending a back-
-// pressure signal. (R, W) (mandatory) (2-bytes)
-//
-// Packet Drop Queue Thresholds
-// Packet drop queue thresholds: This attribute is a composite of four 2-byte values, a minimum and
-// a maximum threshold, measured in bytes, scaled by the priority queue scale factor attribute of
-// the ONU2-G, for green and yellow packets. The first value is the minimum green threshold, the
-// queue occupancy below which all green packets are admitted to the queue. The second value is the
-// maximum green threshold, the queue occupancy at or above which all green packets are discarded.
-// The third value is the minimum yellow threshold, the queue occupancy below which all yellow
-// packets are admitted to the queue. The fourth value is the maximum yellow threshold, the queue
-// occupancy at or above which all yellow packets are discarded. The default is that all thresholds
-// take the value of the maximum queue size. (R,-W) (optional) (8-bytes)
-//
-// Packet Drop Max_P
-// Packet drop max_p: This attribute is a composite of two 1-byte values, the probability of
-// dropping a coloured packet when the queue occupancy lies just below the maximum threshold for
-// packets of that colour. The first value is the green packet max_p, and the second value is the
-// yellow packet max_p. The probability, max_p, is determined by adding one to the unsigned value
-// (0..255) of this attribute and dividing the result by 256. The default for each value is 255.
-// (R,-W) (optional) (2-bytes)
-//
-// Queue Drop W_Q
-// Queue drop w_q: This attribute determines the averaging coefficient, w_q, as described in
-// [b-Floyd]. The averaging coefficient, w_q, is equal to 2Queue_drop_w_q. For example, when queue
-// drop_w_q has the value 9, the averaging coefficient, w_q, is 1/512-= 0.001-9. The default value
-// is 9. (R,-W) (optional) (1-byte)
-//
-// Drop Precedence Colour Marking
-// (R,-W) (optional) (1-byte)
-//
-type PriorityQueue struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- priorityqueueBME = &ManagedEntityDefinition{
- Name: "PriorityQueue",
- ClassID: 277,
- MessageTypes: mapset.NewSetWith(
- Get,
- Set,
- ),
- AllowedAttributeMask: 0xffff,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
- 1: ByteField("QueueConfigurationOption", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
- 2: Uint16Field("MaximumQueueSize", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
- 3: Uint16Field("AllocatedQueueSize", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3),
- 4: Uint16Field("DiscardBlockCounterResetInterval", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
- 5: Uint16Field("ThresholdValueForDiscardedBlocksDueToBufferOverflow", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, true, false, 5),
- 6: Uint32Field("RelatedPort", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
- 7: Uint16Field("TrafficSchedulerPointer", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, false, false, 7),
- 8: ByteField("Weight", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, false, false, 8),
- 9: Uint16Field("BackPressureOperation", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, false, false, 9),
- 10: Uint32Field("BackPressureTime", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, false, false, 10),
- 11: Uint16Field("BackPressureOccurQueueThreshold", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, false, false, 11),
- 12: Uint16Field("BackPressureClearQueueThreshold", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, false, false, 12),
- 13: Uint64Field("PacketDropQueueThresholds", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, true, false, 13),
- 14: Uint16Field("PacketDropMaxP", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), false, true, false, 14),
- 15: ByteField("QueueDropWQ", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read, Write), false, true, false, 15),
- 16: ByteField("DropPrecedenceColourMarking", UnsignedIntegerAttributeType, 0x0001, 0, mapset.NewSetWith(Read, Write), false, true, false, 16),
- },
- Access: CreatedByOnu,
- Support: UnknownSupport,
- Alarms: AlarmMap{
- 0: "Block loss",
- },
- }
-}
-
-// NewPriorityQueue (class ID 277) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewPriorityQueue(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*priorityqueueBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/pseudowireterminationpoint.go b/vendor/github.com/opencord/omci-lib-go/generated/pseudowireterminationpoint.go
deleted file mode 100644
index 54f30ec..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/pseudowireterminationpoint.go
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// PseudowireTerminationPointClassID is the 16-bit ID for the OMCI
-// Managed entity Pseudowire termination point
-const PseudowireTerminationPointClassID ClassID = ClassID(282)
-
-var pseudowireterminationpointBME *ManagedEntityDefinition
-
-// PseudowireTerminationPoint (class ID #282)
-// The pseudowire TP supports packetized (rather than TDM) transport of TDM services, transported
-// either directly over Ethernet, over UDP/IP or over MPLS. Instances of this ME are created and
-// deleted by the OLT.
-//
-// Relationships
-// One pseudowire TP ME exists for each distinct TDM service that is mapped to a pseudowire.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
-// (mandatory) (2-bytes)
-//
-// Underlying Transport
-// (R,-W, setbycreate) (mandatory) (1-byte)
-//
-// Service Type
-// (R,-W, setbycreate) (mandatory) (1-byte)
-//
-// Signalling
-// (R,-W, setbycreate) (mandatory for structured service type) (1-byte)
-//
-// Tdm Uni Pointer
-// TDM UNI pointer: If service type-= structured, this attribute points to a logical N-* 64-kbit/s
-// subport CTP. Otherwise, this attribute points to a PPTP CES UNI. (R,-W, setbycreate) (mandatory)
-// (2-bytes)
-//
-// North_Side Pointer
-// North-side pointer: When the pseudowire service is transported via IP, as indicated by the
-// underlying transport attribute, the northside pointer attribute points to an instance of the
-// TCP/UDP config data ME. When the pseudowire service is transported directly over Ethernet, the
-// north-side pointer attribute is not used - the linkage to the Ethernet flow TP is implicit in
-// the ME IDs. When the pseudowire service is transported over MPLS, the northside pointer
-// attribute points to an instance of the MPLS PW TP. (R, W, setbycreate) (mandatory) (2 bytes)
-//
-// Far_End Ip Info
-// A null pointer is appropriate if the pseudowire is not transported via IP. (R,-W, setbycreate)
-// (mandatory for IP transport) (2-bytes)
-//
-// Payload Size
-// (R,-W, setbycreate) (mandatory for unstructured service) (2-bytes)
-//
-// Payload Encapsulation Delay
-// (R,-W, setbycreate) (mandatory for structured service) (1-byte)
-//
-// Timing Mode
-// (R,-W) (mandatory) (1-byte)
-//
-// Transmit Circuit Id
-// (R,-W) (mandatory for MEF 8 transport) (8-bytes)
-//
-// Expected Circuit Id
-// (R,-W) (optional for MEF 8 transport) (8-bytes)
-//
-// Received Circuit Id
-// Received circuit ID: This attribute indicates the actual ECID(s) received on the payload and
-// signalling channels, respectively. It may be used for diagnostic purposes. (R) (optional for MEF
-// 8 transport) (8-bytes)
-//
-// Exception Policy
-// Exception policy: This attribute points to an instance of the pseudowire maintenance profile ME.
-// If the pointer has its default value 0, the ONU's internal defaults apply. (R,-W) (optional)
-// (2-bytes)
-//
-// Arc
-// ARC: See clause A.1.4.3. (R,-W) (optional) (1-byte)
-//
-// Arc Interval
-// ARC interval: See clause A.1.4.3. (R,-W) (optional) (1-byte)
-//
-type PseudowireTerminationPoint struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- pseudowireterminationpointBME = &ManagedEntityDefinition{
- Name: "PseudowireTerminationPoint",
- ClassID: 282,
- MessageTypes: mapset.NewSetWith(
- Create,
- Delete,
- Get,
- Set,
- ),
- AllowedAttributeMask: 0xfffe,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
- 1: ByteField("UnderlyingTransport", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
- 2: ByteField("ServiceType", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
- 3: ByteField("Signalling", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
- 4: Uint16Field("TdmUniPointer", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
- 5: Uint16Field("NorthSidePointer", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
- 6: Uint16Field("FarEndIpInfo", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
- 7: Uint16Field("PayloadSize", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
- 8: ByteField("PayloadEncapsulationDelay", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
- 9: ByteField("TimingMode", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, false, false, 9),
- 10: Uint64Field("TransmitCircuitId", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, false, false, 10),
- 11: Uint64Field("ExpectedCircuitId", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, false, false, 11),
- 12: Uint64Field("ReceivedCircuitId", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
- 13: Uint16Field("ExceptionPolicy", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, true, false, 13),
- 14: ByteField("Arc", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), true, true, false, 14),
- 15: ByteField("ArcInterval", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read, Write), false, true, false, 15),
- },
- Access: CreatedByOlt,
- Support: UnknownSupport,
- }
-}
-
-// NewPseudowireTerminationPoint (class ID 282) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewPseudowireTerminationPoint(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*pseudowireterminationpointBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/pwatmconfigurationdata.go b/vendor/github.com/opencord/omci-lib-go/generated/pwatmconfigurationdata.go
deleted file mode 100644
index fb53f29..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/pwatmconfigurationdata.go
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// PwAtmConfigurationDataClassID is the 16-bit ID for the OMCI
-// Managed entity PW ATM configuration data
-const PwAtmConfigurationDataClassID ClassID = ClassID(337)
-
-var pwatmconfigurationdataBME *ManagedEntityDefinition
-
-// PwAtmConfigurationData (class ID #337)
-// This ME contains generic configuration data for an ATM pseudowire. Definitions of attributes are
-// from PW-ATM-MIB [IETF RFC 5605]. Instances of this ME are created and deleted by the OLT.
-//
-// Relationships
-// An instance of this ME is associated with an instance of the MPLS pseudowire TP ME with a
-// pseudowire type attribute equal to one of the following.//// 2 ATM AAL5 SDU VCC transport//// 3 ATM transparent cell transport//// 9 ATM n-to-one VCC cell transport//// 10 ATM n-to-one VPC cell transport//// 12 ATM one-to-one VCC cell mode//// 13 ATM one-to-one VPC cell mode//// 14 ATM AAL5 PDU VCC transport//// Alternatively, an instance of this ME may be associated with an Ethernet flow TP or a TCP/UDP
-// config data ME, depending on the transport layer of the pseudowire.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. (R,
-// setbycreate)-(mandatory) (2 bytes)
-//
-// Tp Type
-// 2 TCP/UDP config data
-//
-// Transport Tp Pointer
-// Transport TP pointer: This attribute points to an associated instance of the transport layer TP,
-// whose type is specified by the TP type attribute. (R, W, setbycreate) (mandatory) (2 bytes)
-//
-// Pptp Atm Uni Pointer
-// PPTP ATM UNI pointer: This attribute points to an associated instance of the ITU-T G.983.2 PPTP
-// ATM UNI. Refer to [ITUT G.983.2] for the definition of the target ME. (R, W, setbycreate)
-// (mandatory) (2 bytes)
-//
-// Max C Ell C Oncatenation
-// Max cell concatenation: This attribute specifies the maximum number of ATM cells that can be
-// concatenated into one PW packet in the upstream direction. (R, W, setbycreate) (mandatory) (2
-// bytes)
-//
-// Far End M Ax C Ell C Oncatenation
-// Far-end max cell concatenation: This attribute specifies the maximum number of ATM cells that
-// can be concatenated into one PW packet as provisioned at the far end. This attribute may be used
-// for error checking of downstream traffic. The value 0 specifies that the ONU uses its internal
-// default. (R, W, set-by-create) (optional) (2 bytes)
-//
-// Atm Cell Loss Priority Clp Qos Mapping
-// The value 0 specifies that the ONU uses its internal default. (R, W, setbycreate) (optional) (1
-// byte)
-//
-// Timeout Mode
-// The value 0 specifies that the ONU uses its internal default. (R, W, setbycreate) (optional) (1
-// byte)
-//
-// Pw Atm Mapping Table
-// (R,-W) (mandatory) (21N bytes, where N is the number of entries in the list)
-//
-type PwAtmConfigurationData struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- pwatmconfigurationdataBME = &ManagedEntityDefinition{
- Name: "PwAtmConfigurationData",
- ClassID: 337,
- MessageTypes: mapset.NewSetWith(
- Create,
- Delete,
- Get,
- GetNext,
- Set,
- SetTable,
- ),
- AllowedAttributeMask: 0xff00,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
- 1: ByteField("TpType", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
- 2: Uint16Field("TransportTpPointer", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
- 3: Uint16Field("PptpAtmUniPointer", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
- 4: Uint16Field("MaxCEllCOncatenation", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
- 5: Uint16Field("FarEndMAxCEllCOncatenation", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
- 6: ByteField("AtmCellLossPriorityClpQosMapping", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 6),
- 7: ByteField("TimeoutMode", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 7),
- 8: TableField("PwAtmMappingTable", TableAttributeType, 0x0100, TableInfo{nil, 21}, mapset.NewSetWith(Read, Write), false, false, false, 8),
- },
- Access: CreatedByOlt,
- Support: UnknownSupport,
- }
-}
-
-// NewPwAtmConfigurationData (class ID 337) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewPwAtmConfigurationData(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*pwatmconfigurationdataBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/recommonamplifierparameters.go b/vendor/github.com/opencord/omci-lib-go/generated/recommonamplifierparameters.go
deleted file mode 100644
index bc83606..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/recommonamplifierparameters.go
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// ReCommonAmplifierParametersClassID is the 16-bit ID for the OMCI
-// Managed entity RE common amplifier parameters
-const ReCommonAmplifierParametersClassID ClassID = ClassID(328)
-
-var recommonamplifierparametersBME *ManagedEntityDefinition
-
-// ReCommonAmplifierParameters (class ID #328)
-// This ME organizes data associated with each OA supported by the RE. The management ONU
-// automatically creates one instance of this ME for each upstream or downstream OA.
-//
-// Relationships
-// An instance of this ME is associated with an instance of the RE downstream amplifier or RE
-// upstream amplifier ME.
-//
-// Attributes
-// Managed Entity Id
-// NOTE - The type of the linked ME can be determined by uniqueness of slot and port.
-//
-// Gain
-// Gain: This attribute reports the current measurement of the OA's gain, in decibels. Its value is
-// a 2s complement integer with 0.25-dB granularity, and with a range from -32-dB to 31.5-dB. The
-// value 0x7F indicates that the current measured gain is 0, i.e., negative infinity in decibels
-// terms. (R) (optional) (1-byte)
-//
-// Lower Gain Threshold
-// Lower gain threshold: This attribute specifies the gain the RE uses to declare the low gain
-// alarm. Valid values are 0-dB (coded as 0x00) to 63.5-dB (coded as 0xFE). The default value 0xFF
-// selects the RE's internal policy. (R,-W) (optional) (1-byte)
-//
-// Upper Gain Threshold
-// Upper gain threshold: This attribute specifies the gain the RE uses to declare the high gain
-// alarm. Valid values are 0-dB (coded as 0x00) to 63.5-dB (coded as 0xFE). The default value 0xFF
-// selects the RE's internal policy. (R,-W) (optional) (1-byte)
-//
-// Target Gain
-// Target gain: This attribute specifies the target gain, when the operational mode of the parent
-// RE downstream or upstream amplifier is set to constant gain mode. Valid values are 0-dB (coded
-// as 0x00) to 63.5-dB (coded as 0xFE). The default value 0xFF selects the RE's internal policy.
-// (R,-W) (optional) (1-byte)
-//
-// Device Temperature
-// Device temperature: This attribute reports the temperature in degrees Celcius of the active
-// device (SOA or pump) in the OA. Its value is a 2s complement integer with granularity
-// 1/256-degree-C. (R) (optional) (2-bytes)
-//
-// Lower Device Temperature Threshold
-// Lower device temperature threshold: This attribute is a 2s complement integer that specifies the
-// temperature the RE uses to declare the low temperature alarm. Valid values are -64 to
-// +63-degree-C in 0.5-degree-C increments. The default value 0x7F selects the RE's internal
-// policy. (R,-W) (optional) (1-byte)
-//
-// Upper Device Temperature Threshold
-// Upper device temperature threshold: This attribute is a 2s complement integer that specifies the
-// temperature the RE uses to declare the high temperature alarm. Valid values are -64 to
-// +63-degree-C in 0.5-degree-C increments. The default value 0x7F selects the RE's internal
-// policy. (R,-W) (optional) (1-byte)
-//
-// Device Bias Current
-// Device bias current: This attribute contains the measured bias current applied to the SOA or
-// pump laser. Its value is an unsigned integer with granularity 2-mA. Valid values are 0 to
-// 512-mA. (R) (optional) (1-byte)
-//
-// Amplifier Saturation Output Power
-// Amplifier saturation output power: This attribute reports the saturation output power of the
-// amplifier as specified by the manufacturer. Its value is an unsigned integer referred to 1-mW
-// (i.e., dBm), with 0.1-dB granularity. (R) (optional) (2-bytes)
-//
-// Amplifier Noise Figure
-// Amplifier noise figure: This attribute reports the intrinsic noise figure of the amplifier, as
-// specified by the manufacturer. Its value is an unsigned integer with 0.1-dB granularity (R)
-// (optional) (1-byte)
-//
-// Amplifier Saturation Gain
-// Amplifier saturation gain: This attribute reports the gain of the amplifier at saturation, as
-// specified by the manufacturer. Its value is an unsigned integer with 0.25-dB granularity, and
-// with a range from 0 to 63.75-dB. (R) (optional) (1-byte)
-//
-type ReCommonAmplifierParameters struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- recommonamplifierparametersBME = &ManagedEntityDefinition{
- Name: "ReCommonAmplifierParameters",
- ClassID: 328,
- MessageTypes: mapset.NewSetWith(
- Get,
- Set,
- ),
- AllowedAttributeMask: 0xffe0,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
- 1: ByteField("Gain", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, true, false, 1),
- 2: ByteField("LowerGainThreshold", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, true, false, 2),
- 3: ByteField("UpperGainThreshold", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, true, false, 3),
- 4: ByteField("TargetGain", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
- 5: Uint16Field("DeviceTemperature", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, true, false, 5),
- 6: ByteField("LowerDeviceTemperatureThreshold", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, true, false, 6),
- 7: ByteField("UpperDeviceTemperatureThreshold", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, true, false, 7),
- 8: ByteField("DeviceBiasCurrent", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, true, false, 8),
- 9: Uint16Field("AmplifierSaturationOutputPower", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, true, false, 9),
- 10: ByteField("AmplifierNoiseFigure", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, true, false, 10),
- 11: ByteField("AmplifierSaturationGain", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, true, false, 11),
- },
- Access: CreatedByOnu,
- Support: UnknownSupport,
- Alarms: AlarmMap{
- 0: "Low gain",
- 1: "High gain",
- 2: "Low temperature",
- 3: "High temperature",
- 4: "High bias current",
- 5: "High temperature shutdown",
- 6: "High current shutdown",
- },
- }
-}
-
-// NewReCommonAmplifierParameters (class ID 328) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewReCommonAmplifierParameters(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*recommonamplifierparametersBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/sipagentconfigdata.go b/vendor/github.com/opencord/omci-lib-go/generated/sipagentconfigdata.go
deleted file mode 100644
index 4594544..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/sipagentconfigdata.go
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// SipAgentConfigDataClassID is the 16-bit ID for the OMCI
-// Managed entity SIP agent config data
-const SipAgentConfigDataClassID ClassID = ClassID(150)
-
-var sipagentconfigdataBME *ManagedEntityDefinition
-
-// SipAgentConfigData (class ID #150)
-// The SIP agent config data ME models a SIP signalling agent. It defines the configuration
-// necessary to establish communication for signalling between the SIP user agent (UA) and a SIP
-// server.
-//
-// NOTE 1 - If a non-OMCI interface is used to manage SIP for VoIP, this ME is unnecessary. The
-// non-OMCI interface supplies the necessary data, which may be read back to the OLT via the SIP
-// config portal ME.
-//
-// Instances of this ME are created and deleted by the OLT.
-//
-// Relationships
-// An instance of this ME serves one or more SIP user data MEs and points to a TCP/UDP config data
-// that carries signalling messages. Other pointers establish additional agent parameters such as
-// proxy servers.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
-// (mandatory) (2-bytes)
-//
-// Proxy Server Address Pointer
-// Proxy server address pointer: This attribute points to a large string ME that contains the name
-// (IP address or URI) of the SIP proxy server for SIP signalling messages. (R,-W, setbycreate)
-// (mandatory) (2-bytes)
-//
-// Outbound Proxy Address Pointer
-// Outbound proxy address pointer: An outbound SIP proxy may or may not be required within a given
-// network. If an outbound SIP proxy is used, the outbound proxy address pointer attribute must be
-// set to point to a valid large string ME that contains the name (IP address or URI) of the
-// outbound proxy server for SIP signalling messages. If an outbound SIP proxy is not used, the
-// outbound proxy address pointer attribute must be set to a null pointer. (R,-W, setbycreate)
-// (mandatory) (2-bytes)
-//
-// Primary Sip Dns
-// Primary SIP DNS: This attribute specifies the primary SIP DNS IP address. If the value of this
-// attribute is 0, the primary DNS server is defined in the corresponding IP host config data or
-// IPv6 host config data ME. If the value is non-zero, it takes precedence over the primary DNS
-// server defined in the IP host config data or IPv6 host config data ME. (R,-W, set-by-create)
-// (mandatory) (4-bytes)
-//
-// Secondary Sip Dns
-// Secondary SIP DNS: This attribute specifies the secondary SIP DNS IP address. If the value of
-// this attribute is 0, the secondary DNS server is defined in the corresponding IP host config
-// data or IPv6 host config data ME. If the value is non-zero, it takes precedence over the
-// secondary DNS server defined in the IP host config data or IPv6 host config data ME. (R,-W, set-
-// by-create) (mandatory) (4-bytes)
-//
-// Tcp_Udp Pointer
-// TCP/UDP pointer: This pointer associates the SIP agent with the TCP/UDP config data ME to be
-// used for communication with the SIP server. The default value is 0xFFFF, a null pointer. (R,-W)
-// (mandatory) (2-bytes)
-//
-// Sip Reg Exp Time
-// SIP reg exp time: This attribute specifies the SIP registration expiration time in seconds. If
-// its value is 0, the SIP agent does not add an expiration time to the registration requests and
-// does not perform reregistration. The default value is 3600-s. (R,-W) (mandatory) (4-bytes)
-//
-// Sip Rereg Head Start Time
-// SIP rereg head start time: This attribute specifies the time in seconds prior to timeout that
-// causes the SIP agent to start the re-registration process. The default value is 360-s. (R,-W)
-// (mandatory) (4-bytes)
-//
-// Host Part Uri
-// Host part URI: This attribute points to a large string ME that contains the host or domain part
-// of the SIP address of record for users connected to this ONU. A null pointer indicates that the
-// current address in the IP host config ME is to be used. (R,-W, setbycreate) (mandatory)
-// (2-bytes)
-//
-// Sip Status
-// (R) (mandatory) (1-byte)
-//
-// Sip Registrar
-// SIP registrar: This attribute points to a network address ME that contains the name (IP address
-// or resolved name) of the registrar server for SIP signalling messages. Examples: "10.10.10.10"
-// and "proxy.voip.net". (R,-W, set-by-create) (mandatory) (2-bytes)
-//
-// Softswitch
-// Softswitch: This attribute identifies the SIP gateway softswitch vendor. The format is four
-// ASCII coded alphabetic characters [A..Z] as defined in [ATIS0300220]. A value of four null bytes
-// indicates an unknown or unspecified vendor. (R,-W, setbycreate) (mandatory) (4-bytes)
-//
-// Sip Response Table
-// NOTE 2 - This model assumes that SIP response tones and text are common to all POTS lines that
-// share a given SIP agent.
-//
-// Sip Option Transmit Control
-// SIP option transmit control: This Boolean attribute specifies that the ONU is (true) or is not
-// (false) enabled to transmit SIP options. The default value is recommended to be false. (R, W,
-// setbycreate) (optional) (1 byte)
-//
-// Sip Uri Format
-// SIP URI format: This attribute specifies the format of the URI in outgoing SIP messages. The
-// recommended default value 0 specifies TEL URIs; the value 1 specifies SIP URIs. Other values are
-// reserved. (R, W, setbycreate) (optional) (1 byte)
-//
-// Redundant Sip Agent Pointer
-// Redundant SIP agent pointer: This attribute points to another SIP agent config data ME, which is
-// understood to provide redundancy. The initial SIP agent is determined by the pointer from the
-// SIP user data ME. It is the manager's responsibility to provision a group of redundant SIP
-// agents with mutually consistent attributes. (R, W, setbycreate) (optional) (2 bytes)
-//
-type SipAgentConfigData struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- sipagentconfigdataBME = &ManagedEntityDefinition{
- Name: "SipAgentConfigData",
- ClassID: 150,
- MessageTypes: mapset.NewSetWith(
- Create,
- Delete,
- Get,
- Set,
- SetTable,
- ),
- AllowedAttributeMask: 0xfffe,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
- 1: Uint16Field("ProxyServerAddressPointer", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
- 2: Uint16Field("OutboundProxyAddressPointer", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
- 3: Uint32Field("PrimarySipDns", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
- 4: Uint32Field("SecondarySipDns", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
- 5: Uint16Field("TcpUdpPointer", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
- 6: Uint32Field("SipRegExpTime", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
- 7: Uint32Field("SipReregHeadStartTime", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, false, false, 7),
- 8: Uint16Field("HostPartUri", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
- 9: ByteField("SipStatus", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), true, false, false, 9),
- 10: Uint16Field("SipRegistrar", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10),
- 11: Uint32Field("Softswitch", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 11),
- 12: MultiByteField("SipResponseTable", OctetsAttributeType, 0x0010, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 12),
- 13: ByteField("SipOptionTransmitControl", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 13),
- 14: ByteField("SipUriFormat", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 14),
- 15: Uint16Field("RedundantSipAgentPointer", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 15),
- },
- Access: CreatedByOlt,
- Support: UnknownSupport,
- Alarms: AlarmMap{
- 0: "SIP-UA register name",
- 1: "SIP-UA register reach",
- 2: "SIP-UA register connect",
- 3: "SIP-UA register validate",
- },
- }
-}
-
-// NewSipAgentConfigData (class ID 150) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewSipAgentConfigData(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*sipagentconfigdataBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/uni-g.go b/vendor/github.com/opencord/omci-lib-go/generated/uni-g.go
deleted file mode 100644
index 58d8f6a..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/uni-g.go
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// UniGClassID is the 16-bit ID for the OMCI
-// Managed entity UNI-G
-const UniGClassID ClassID = ClassID(264)
-
-var unigBME *ManagedEntityDefinition
-
-// UniG (class ID #264)
-// This ME organizes data associated with UNIs supported by GEM. One instance of the UNI-G ME
-// exists for each UNI supported by the ONU.
-//
-// The ONU automatically creates or deletes instances of this ME upon the creation or deletion of a
-// real or virtual circuit pack ME, one per port.
-//
-// Relationships
-// An instance of the UNI-G ME exists for each instance of a PPTP ME.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
-// identical ID, this ME is implicitly linked to an instance of a PPTP. (R) (mandatory) (2-bytes)
-//
-// Deprecated
-// Deprecated: This attribute is not used. It should be set to 0 by the OLT and ignored by the ONU.
-// (R,-W) (mandatory) (2-bytes)
-//
-// Administrative State
-// NOTE - PPTP MEs also have an administrative state attribute. The user port is unlocked only if
-// both administrative state attributes are set to unlocked. It is recommended that this attribute
-// not be used: that the OLT set it to 0 and that the ONU ignore it.
-//
-// Management Capability
-// (R) (optional) (1-byte)
-//
-// Non_Omci Management Identifier
-// Non-OMCI management identifier: If a PPTP can be managed either directly by the OMCI or a non-
-// OMCI management environment, this attribute specifies how it is in fact to be managed. This
-// attribute is either 0 (default-=-OMCI management), or it is a pointer to a VEIP, which in turn
-// links to a non-OMCI management environment. (R,-W) (optional) (2-bytes)
-//
-// Relay Agent Options
-// 2/3/4:atm/123.4567
-//
-type UniG struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- unigBME = &ManagedEntityDefinition{
- Name: "UniG",
- ClassID: 264,
- MessageTypes: mapset.NewSetWith(
- Get,
- Set,
- ),
- AllowedAttributeMask: 0xf800,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
- 1: Uint16Field("Deprecated", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, true, 1),
- 2: ByteField("AdministrativeState", EnumerationAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
- 3: ByteField("ManagementCapability", EnumerationAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, true, false, 3),
- 4: Uint16Field("NonOmciManagementIdentifier", PointerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, true, false, 4),
- 5: Uint16Field("RelayAgentOptions", PointerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, true, false, 5),
- },
- Access: CreatedByOnu,
- Support: UnknownSupport,
- }
-}
-
-// NewUniG (class ID 264) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewUniG(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*unigBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/vdsl2lineconfigurationextensions2.go b/vendor/github.com/opencord/omci-lib-go/generated/vdsl2lineconfigurationextensions2.go
deleted file mode 100644
index 844bb19..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/vdsl2lineconfigurationextensions2.go
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// Vdsl2LineConfigurationExtensions2ClassID is the 16-bit ID for the OMCI
-// Managed entity VDSL2 line configuration extensions 2
-const Vdsl2LineConfigurationExtensions2ClassID ClassID = ClassID(323)
-
-var vdsl2lineconfigurationextensions2BME *ManagedEntityDefinition
-
-// Vdsl2LineConfigurationExtensions2 (class ID #323)
-// This ME extends the xDSL line configuration MEs. The ME name was chosen because its attributes
-// were initially unique to ITU-T G.993.2 VDSL2. Due to continuing standards development, two of
-// the attributes (FEXT and NEXT TXREFVNds) are also used in [ITUT-G.992.3] and [ITUT-G.992.5].
-// This ME therefore pertains to the latter Recommendations as well as to [ITU-T-G.993.2].
-//
-// The attributes of this ME are further defined in [ITU-T G.997.1].
-//
-// An instance of this ME is created and deleted by the OLT.
-//
-// Relationships
-// An instance of this ME may be associated with zero or more instances of the PPTP xDSL UNI part
-// 1.//// The overall xDSL line configuration profile is modelled in several parts, all of which are
-// associated together through a common ME ID. (The client PPTP xDSL UNI part 1 has a single
-// pointer, which refers to the entire set of line configuration parts.)
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. All xDSL and
-// VDSL2 line configuration profiles and extensions that pertain to a given PPTP xDSL must share a
-// common ME ID. (R, setbycreate) (mandatory) (2-bytes)
-//
-// Sos Time Downstream
-// SOS time downstream: The SOS-TIME-ds attribute is used in the specification of receiver
-// initiated SOS (see clause 13.4.3 of [ITUT G.993.2]). If the attribute value is not zero, the
-// standard SOS triggering criteria are enabled, and the value specifies the duration of the window
-// used in the standard SOS triggering criteria in the downstream direction. The special value zero
-// indicates that the standard SOS triggering criteria are disabled, i.e., vendor-discretionary
-// values may be used instead of the values configured in the MIB for the following parameters:
-// SOS-NTONES-ds, SOS-CRC-ds, SOS-TIME-ds. The valid range of non-zero values is from 1..255,
-// specifying 64-ms to 16320 ms in steps of 64-ms. (R,-W, setbycreate) (optional) (1-byte)
-//
-// Sos Time Upstream
-// SOS time upstream: The SOS-TIME-us attribute is used in the specification of receiver initiated
-// SOS (see clause 13.4.3 of [ITUT G.993.2]). If the attribute value is not zero, the standard SOS
-// triggering criteria are enabled, and the value specifies the duration of the window used in the
-// standard SOS triggering criteria in the upstream direction. The special value zero indicates
-// that the standard SOS triggering criteria are disabled, i.e., vendor-discretionary values may be
-// used instead of the values configured in the MIB for the following parameters: SOS-NTONES-us,
-// SOS-CRC-us, SOS-TIME-us. The valid range of non-zero values is from 1..255, specifying 64-ms to
-// 16320-ms in steps of 64-ms. (R,-W, setbycreate) (optional) (1-byte)
-//
-// Sos Degraded Tones Threshold Downstream
-// SOS degraded tones threshold downstream: The SOS-NTONES-ds attribute is the minimum percentage
-// of tones in the downstream medley set that must be degraded in order to arm the first
-// subcondition of the standard SOS triggering criteria in the downstream direction. The valid
-// range of values is from 1 to 100% in steps of 1. Use of the special value 0 is described in
-// clause 13.4.3.2 of [ITUT G.993.2]. (R,-W, setbycreate) (optional) (1-byte)
-//
-// Sos Degraded Tones Threshold Upstream
-// SOS degraded tones threshold upstream: The SOS-NTONES-us attribute is the minimum percentage of
-// tones in the upstream medley set that must be degraded in order to arm the first subcondition of
-// the standard SOS triggering criteria in the upstream direction. The valid range of values is
-// from 1 to 100% in steps of 1. Use of the special value 0 is described in clause 13.4.3.2 of
-// [ITUT-G.993.2]. (R,-W, setbycreate) (optional) (1-byte)
-//
-// Sos Crc Threshold Downstream
-// SOS CRC threshold downstream: The SOS-CRC-ds attribute is the minimum number of normalized CRC
-// anomalies received in SOS-TIME-ds seconds in order to arm the second sub-condition of the
-// standard SOS triggering criteria (see clause 13.4.3.2 of [ITU T G.993.2]) in the downstream
-// direction. The valid range of SOS-CRC values is 0.02 to (216-1)*0.02, in steps of 0.02. The
-// value-0 specifies that the ONU uses its internal default. (R, W, set-by-create) (optional) (2
-// bytes)
-//
-// Sos Crc Threshold Upstream
-// SOS CRC threshold upstream: The SOS-CRC-us attribute is the minimum number of normalized CRC
-// anomalies received in SOS-TIME-us seconds in order to arm the second sub-condition of the
-// standard SOS triggering criteria (see clause 13.4.3.2 of [ITU T G.993.2]) in the upstream
-// direction. The valid range of SOS-CRC values is 0.02 to (216-1)*0.02, in steps of 0.02. The
-// value-0 specifies that the ONU uses its internal default. (R, W, set-by-create) (optional) (2
-// bytes)
-//
-// Max Sos Downstream
-// MAX SOS downstream: The MAX-SOS-ds attribute is used in deactivation. If the number of
-// successful SOS procedures in the downstream direction performed within a 120-s interval exceeds
-// MAX-SOS-ds, the modem goes to state L3. See clause 12.1.4 of [ITUT G.993.2] for details. The
-// valid range of values is 1 to 15, with the special value 0 as described in clause 12.1 of [ITUT
-// G.993.2]. (R,-W, setbycreate) (optional) (1-byte)
-//
-// Max Sos Upstream
-// MAX SOS upstream: The MAX-SOS-us attribute is used in deactivation. If the number of successful
-// SOS procedures in the upstream direction performed within a 120-s interval exceeds MAX-SOS-us,
-// the modem goes to state L3. See clause 12.1.4 of [ITUT G.993.2] for details. The valid range of
-// values is 1 to 15, with the special value 0 as described in clause 12.1 of [ITUT G.993.2].
-// (R,-W, setbycreate) (optional) (1-byte)
-//
-// Snr Max Offset Downstream
-// SNR max offset downstream: The SNRMOFFSET-ROC-ds attribute is the SNR margin offset for the ROC
-// in the downstream direction. The attribute is used in the specification of the channel
-// initialization policy (see clause 12.3.7.1 of [ITUT G.993.2]). The valid range of SNR margin
-// offset values is from 0..31-dB in 0.1-dB steps. (R,-W, setbycreate) (optional) (2-bytes)
-//
-// Snr Max Offset Upstream
-// SNR max offset upstream: The SNRMOFFSET-ROC-us attribute is the SNR margin offset for the ROC in
-// the upstream direction. The attribute is used in the specification of the channel initialization
-// policy (see clause-12.3.7.1 of [ITUT G.993.2]). The valid range of SNR margin offset values is
-// from 0..31-dB in 0.1-dB steps. (R,-W, setbycreate) (optional) (2-bytes)
-//
-// Roc Minimum Impulse Noise Protection Downstream
-// ROC minimum impulse noise protection downstream: The INPMIN-ROC-ds attribute specifies the
-// minimum INP to apply on the ROC in the downstream direction expressed in multiples of equivalent
-// 4k DMT, xDSL (DMT) symbol length. The minimum INP is an integer ranging from 0 to 8. (R,-W,
-// setbycreate) (optional) (1-byte)
-//
-// Roc Minimum Impulse Noise Protection Upstream
-// ROC minimum impulse noise protection upstream: The INPMIN-ROC-us attribute specifies the minimum
-// impulse noise protection to apply on the ROC in the upstream direction expressed in multiples of
-// equivalent 4k DMT symbol length. The minimum INP is an integer ranging from 0 to 8. (R,-W,
-// setbycreate) (optional) (1-byte)
-//
-// Fext Downstream Transmitter Referred Virtual Noise Table
-// FEXT downstream transmitter referred virtual noise table: The FEXT TXREFVNds attribute is the
-// downstream transmitter referred virtual noise specified for FEXTR duration in Annex C of [ITUT
-// G.992.3] (ADSL2) and Annex C of [ITUT G.992.5] (ADSL2plus). The syntax of this attribute is the
-// same as that of the TXREFVNds table attribute of the VDSL2 line configuration extensions ME.
-// (R,-W) (mandatory for Annex-C of [ITUT-G.992.3] and Annex-C of [ITUT-G.992.5]) (3-*-N bytes,
-// where N is the number of breakpoints)
-//
-// Next Downstream Transmitter Referred Virtual Noise Table
-// NEXT downstream transmitter referred virtual noise table: The NEXT TXREFVNds attribute is the
-// downstream transmitter referred virtual noise specified for NEXTR duration in Annex C of [ITUT
-// G.992.3] (ADSL2) and Annex C of [ITUT G.992.5] (ADSL2plus). The syntax of this attribute is the
-// same as that of the TXREFVNds table attribute of the VDSL2 line configuration extensions ME.
-// (R,-W) (mandatory for Annex-C of [ITUT-G.992.3] and Annex-C of [ITUT-G.992.5]) (3-*-N bytes,
-// where N is the number of breakpoints)
-//
-type Vdsl2LineConfigurationExtensions2 struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- vdsl2lineconfigurationextensions2BME = &ManagedEntityDefinition{
- Name: "Vdsl2LineConfigurationExtensions2",
- ClassID: 323,
- MessageTypes: mapset.NewSetWith(
- Create,
- Delete,
- Get,
- GetNext,
- Set,
- SetTable,
- ),
- AllowedAttributeMask: 0xfffc,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
- 1: ByteField("SosTimeDownstream", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 1),
- 2: ByteField("SosTimeUpstream", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 2),
- 3: ByteField("SosDegradedTonesThresholdDownstream", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 3),
- 4: ByteField("SosDegradedTonesThresholdUpstream", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 4),
- 5: Uint16Field("SosCrcThresholdDownstream", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
- 6: Uint16Field("SosCrcThresholdUpstream", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 6),
- 7: ByteField("MaxSosDownstream", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 7),
- 8: ByteField("MaxSosUpstream", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 8),
- 9: Uint16Field("SnrMaxOffsetDownstream", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 9),
- 10: Uint16Field("SnrMaxOffsetUpstream", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 10),
- 11: ByteField("RocMinimumImpulseNoiseProtectionDownstream", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 11),
- 12: ByteField("RocMinimumImpulseNoiseProtectionUpstream", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 12),
- 13: TableField("FextDownstreamTransmitterReferredVirtualNoiseTable", TableAttributeType, 0x0008, TableInfo{nil, 3}, mapset.NewSetWith(Read, Write), false, false, false, 13),
- 14: TableField("NextDownstreamTransmitterReferredVirtualNoiseTable", TableAttributeType, 0x0004, TableInfo{nil, 3}, mapset.NewSetWith(Read, Write), false, false, false, 14),
- },
- Access: CreatedByOlt,
- Support: UnknownSupport,
- }
-}
-
-// NewVdsl2LineConfigurationExtensions2 (class ID 323) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewVdsl2LineConfigurationExtensions2(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*vdsl2lineconfigurationextensions2BME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/vdsl2lineinventoryandstatusdatapart3.go b/vendor/github.com/opencord/omci-lib-go/generated/vdsl2lineinventoryandstatusdatapart3.go
deleted file mode 100644
index aeead66..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/vdsl2lineinventoryandstatusdatapart3.go
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// Vdsl2LineInventoryAndStatusDataPart3ClassID is the 16-bit ID for the OMCI
-// Managed entity VDSL2 line inventory and status data part 3
-const Vdsl2LineInventoryAndStatusDataPart3ClassID ClassID = ClassID(170)
-
-var vdsl2lineinventoryandstatusdatapart3BME *ManagedEntityDefinition
-
-// Vdsl2LineInventoryAndStatusDataPart3 (class ID #170)
-// This ME extends the other xDSL line inventory and status data MEs with attributes specific to
-// VDSL2. This ME contains per-band attributes for both directions. These same attributes are
-// defined in the xDSL line inventory and status data part 2 ME, but only for a single band. [ITUT
-// G.993.2] allows for VDSL2 to have as many as five bands upstream and as many as five bands
-// downstream.
-//
-// Relationships
-// This is one of the status data MEs associated with an xDSL UNI. It is required only if VDSL2 is
-// supported by the PPTP. The ONU automatically creates or deletes an instance of this ME upon
-// creation or deletion of a PPTP xDSL UNI part 1 that supports these attributes.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
-// identical ID, this ME is implicitly linked to an instance of the PPTP xDSL UNI part 1 ME. (R)
-// (mandatory) (2-bytes)
-//
-// Downstream Line Attenuation Per Band
-// Downstream line attenuation per band: The LATNds attribute is defined per usable band. It is the
-// squared magnitude of the channel characteristics function, H(f), averaged over this band, and
-// measured during loop diagnostic mode and initialization. The exact definition is included in the
-// relevant xDSL Recommendation. The upstream line attenuation per band ranges from 0 (0.0-dB) to
-// 1270 (+127.0-dB). The special value 0xFFFF indicates that the line attenuation per band is out
-// of the range to be represented. (R) (mandatory) (3-bands * 2-bytes-=-6-bytes)
-//
-// Upstream Line Attenuation Per Band
-// Upstream line attenuation per band: The LATNus attribute is defined per usable band. It is the
-// squared magnitude of the channel characteristics function H(f) averaged over this band, and
-// measured during loop diagnostic mode and initialization. The exact definition is included in the
-// relevant xDSL Recommendation. The upstream line attenuation per band ranges from 0 (0.0-dB) to
-// 1270 (+127.0-dB). The special value 0xFFFF indicates that line attenuation per band is out of
-// range to be represented. (R) (mandatory) (4-bands * 2-bytes-=-8-bytes)
-//
-// Downstream Signal Attenuation Per Band
-// NOTE 1 - During showtime, only a subset of the subcarriers may be transmitted by the xTU-C, as
-// compared to loop diagnostic mode and initialization. Therefore, the downstream signal
-// attenuation value during showtime may be significantly lower than the downstream signal
-// attenuation value during loop diagnostic mode and initialization.
-//
-// Upstream Signal Attenuation Per Band
-// NOTE 2 - During showtime, only a subset of the subcarriers may be transmitted by the xTU-R, as
-// compared to loop diagnostic mode and initialization. Therefore, the upstream signal attenuation
-// value during showtime may be significantly lower than the upstream signal attenuation value
-// during loop diagnostic mode and initialization.
-//
-// Downstream Snr Margin Per Band
-// Downstream SNR margin per band: The SNRMpbds attribute is defined per usable band. The
-// downstream SNR margin per band is the maximum increase of noise power received at the xTU-R,
-// such that the BER requirements are met for all downstream bearer channels. Each array value
-// ranges from 0 (-64.0-dB) to 1270 (+63.0-dB). The special value 0xFFFF indicates that the
-// attribute is out of range to be represented. (R) (mandatory) (3 bands * 2-bytes-=-6-bytes)
-//
-// Upstream Snr Margin Per Band
-// Upstream SNR margin per band: The SNRMpbus attribute is defined per usable band. The upstream
-// SNR margin per band is the maximum increase of noise power received at the xTU-C, such that the
-// BER requirements are met for all upstream bearer channels. Each array value ranges from 0
-// (-64.0-dB) to 1270 (+63.0-dB). The special value 0xFFFF indicates that the attribute is out of
-// range to be represented. (R) (mandatory) (4 bands * 2-bytes-= 8-bytes)
-//
-type Vdsl2LineInventoryAndStatusDataPart3 struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- vdsl2lineinventoryandstatusdatapart3BME = &ManagedEntityDefinition{
- Name: "Vdsl2LineInventoryAndStatusDataPart3",
- ClassID: 170,
- MessageTypes: mapset.NewSetWith(
- Get,
- ),
- AllowedAttributeMask: 0xfc00,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
- 1: MultiByteField("DownstreamLineAttenuationPerBand", OctetsAttributeType, 0x8000, 3, toOctets("AAAA"), mapset.NewSetWith(Read), false, false, false, 1),
- 2: Uint32Field("UpstreamLineAttenuationPerBand", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
- 3: MultiByteField("DownstreamSignalAttenuationPerBand", OctetsAttributeType, 0x2000, 3, toOctets("AAAA"), mapset.NewSetWith(Read), false, false, false, 3),
- 4: Uint32Field("UpstreamSignalAttenuationPerBand", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
- 5: MultiByteField("DownstreamSnrMarginPerBand", OctetsAttributeType, 0x0800, 3, toOctets("AAAA"), mapset.NewSetWith(Read), false, false, false, 5),
- 6: Uint32Field("UpstreamSnrMarginPerBand", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
- },
- Access: CreatedByOnu,
- Support: UnknownSupport,
- }
-}
-
-// NewVdsl2LineInventoryAndStatusDataPart3 (class ID 170) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewVdsl2LineInventoryAndStatusDataPart3(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*vdsl2lineinventoryandstatusdatapart3BME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/vlantaggingoperationconfigurationdata.go b/vendor/github.com/opencord/omci-lib-go/generated/vlantaggingoperationconfigurationdata.go
deleted file mode 100644
index db6b216..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/vlantaggingoperationconfigurationdata.go
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// VlanTaggingOperationConfigurationDataClassID is the 16-bit ID for the OMCI
-// Managed entity VLAN tagging operation configuration data
-const VlanTaggingOperationConfigurationDataClassID ClassID = ClassID(78)
-
-var vlantaggingoperationconfigurationdataBME *ManagedEntityDefinition
-
-// VlanTaggingOperationConfigurationData (class ID #78)
-// This ME organizes data associated with VLAN tagging. Instances of this ME are created and
-// deleted by the OLT.
-//
-// NOTE 1 - The extended VLAN tagging operation configuration data of clause 9.3.13 is preferred
-// for new implementations.
-//
-// Relationships
-// Zero or one instance of this ME may exist for an instance of any ME that can terminate or modify
-// an Ethernet stream.//// When this ME is associated with a UNI-side TP, it performs its upstream classification and
-// tagging operations before offering the upstream frame to other filtering, bridging or switching
-// functions. In the downstream direction, the defined inverse operation is the last operation
-// performed on the frame before offering it to the UNI-side termination.//// When this ME is associated with an ANI-side TP, it performs its upstream classification and
-// tagging operations as the last step before queueing for transmission to the OLT, after having
-// received the upstream frame from other filtering, bridging or switching functions. In the
-// downstream direction, the defined inverse operation is the first operation performed on the
-// frame before offering it to possible filter, bridge or switch functions.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. When the
-// optional association type attribute is 0 or undefined, this attribute's value is the same as the
-// ID of the ME with which this VLAN tagging operation configuration data instance is associated,
-// which may be either a PPTP Ethernet UNI or an IP host config data or an IPv6 host config data
-// ME. Otherwise, the value of the ME ID is unconstrained except by the need to be unique. (R, set-
-// by-create) (mandatory) (2 bytes)
-//
-// Upstream Vlan Tagging Operation Mode
-// (R,-W, setbycreate) (mandatory) (1-byte)
-//
-// Upstream Vlan Tag Tci Value
-// Upstream VLAN tag TCI value: This attribute specifies the TCI for upstream VLAN tagging. It is
-// used when the upstream VLAN tagging operation mode is 1 or 2. (R,-W, setbycreate) (mandatory)
-// (2-bytes)
-//
-// Downstream Vlan Tagging Operation Mode
-// (R,-W, setbycreate) (mandatory) (1-byte)
-//
-// Association Type
-// The associated ME instance is identified by the associated ME pointer. (R,-W, setbycreate)
-// (optional) (1-byte)
-//
-// Associated Me Pointer
-// NOTE 3 - When the association type is xDSL, the two MSBs may be used to indicate a bearer
-// channel.
-//
-type VlanTaggingOperationConfigurationData struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- vlantaggingoperationconfigurationdataBME = &ManagedEntityDefinition{
- Name: "VlanTaggingOperationConfigurationData",
- ClassID: 78,
- MessageTypes: mapset.NewSetWith(
- Create,
- Delete,
- Get,
- Set,
- ),
- AllowedAttributeMask: 0xf800,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
- 1: ByteField("UpstreamVlanTaggingOperationMode", EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
- 2: Uint16Field("UpstreamVlanTagTciValue", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
- 3: ByteField("DownstreamVlanTaggingOperationMode", EnumerationAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
- 4: ByteField("AssociationType", EnumerationAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 4),
- 5: Uint16Field("AssociatedMePointer", PointerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
- },
- Access: CreatedByOlt,
- Support: UnknownSupport,
- }
-}
-
-// NewVlanTaggingOperationConfigurationData (class ID 78) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewVlanTaggingOperationConfigurationData(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*vlantaggingoperationconfigurationdataBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/voiceserviceprofile.go b/vendor/github.com/opencord/omci-lib-go/generated/voiceserviceprofile.go
deleted file mode 100644
index 8569032..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/voiceserviceprofile.go
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// VoiceServiceProfileClassID is the 16-bit ID for the OMCI
-// Managed entity Voice service profile
-const VoiceServiceProfileClassID ClassID = ClassID(58)
-
-var voiceserviceprofileBME *ManagedEntityDefinition
-
-// VoiceServiceProfile (class ID #58)
-// This ME organizes data that describe the voice service functions of the ONU. Instances of this
-// ME are created and deleted by the OLT.
-//
-// Relationships
-// An instance of this ME may be associated with zero or more instances of a VoIP voice CTP by way
-// of a VoIP media profile.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
-// (mandatory) (2-bytes)
-//
-// Announcement Type
-// (R,-W, setbycreate) (mandatory) (1-byte)
-//
-// Jitter Target
-// Jitter target: This attribute specifies the target value of the jitter buffer in milliseconds.
-// The system tries to maintain the jitter buffer at the target value. The value 0 specifies
-// dynamic jitter buffer sizing. (R,-W, setbycreate) (optional) (2-bytes)
-//
-// Jitter Buffer Max
-// Jitter buffer max: This attribute specifies the maximum depth of the jitter buffer associated
-// with this service in milliseconds. The value 0 specifies that the ONU uses its internal default.
-// (R,-W, set-by-create) (optional) (2-bytes)
-//
-// Echo Cancel Ind
-// Echo cancel ind: The Boolean value true specifies that echo cancellation is on; false specifies
-// off. (R,-W, setbycreate) (mandatory) (1-byte)
-//
-// Pstn Protocol Variant
-// PSTN protocol variant: This attribute controls which variant of POTS signalling is used on the
-// associated UNIs. Its value is equal to the [ITU-T E.164] country code. The value 0 specifies
-// that the ONU uses its internal default. (R,-W, set-by-create) (optional) (2-bytes)
-//
-// Dtmf Digit Levels
-// DTMF digit levels: This attribute specifies the power level of DTMF digits that may be generated
-// by the ONU towards the subscriber set. It is a 2s complement value referred to 1-mW at the 0
-// transmission level point (TLP) (dBm0), with resolution 1-dB. The default value 0x8000 selects
-// the ONU's internal policy. (R, W, setbycreate) (optional) (2-bytes)
-//
-// Dtmf Digit Duration
-// DTMF digit duration: This attribute specifies the duration of DTMF digits that may be generated
-// by the ONU towards the subscriber set. It is specified in milliseconds. The default value 0
-// selects the ONU's internal policy. (R, W, setbycreate) (optional) (2 bytes)
-//
-// Hook Flash Minimum Time
-// Hook flash minimum time: This attribute defines the minimum duration recognized by the ONU as a
-// switchhook flash. It is expressed in milliseconds; the default value 0 selects the ONU's
-// internal policy. (R, W, setbycreate) (optional) (2 bytes)
-//
-// Hook Flash Maximum Time
-// Hook flash maximum time: This attribute defines the maximum duration recognized by the ONU as a
-// switchhook flash. It is expressed in milliseconds; the default value 0 selects the ONU's
-// internal policy. (R, W, setbycreate) (optional) (2 bytes)
-//
-// Tone Pattern Table
-// (R,-W) (optional) (N * 20 bytes)
-//
-// Tone Event Table
-// (R,-W) (optional) (N * 7 bytes).
-//
-// Ringing Pattern Table
-// (R,-W) (optional) (N * 5 bytes).
-//
-// Ringing Event Table
-// (R,-W) (optional) (N * 7 bytes).
-//
-// Network Specific Extensions Pointer
-// Network specific extensions pointer: This attribute points to a network address ME that contains
-// the path and name of a file containing network specific parameters for the associated UNIs. The
-// default value for this attribute is 0xFFFF, a null pointer. (R,-W, set-by-create) (optional)
-// (2-bytes)
-//
-type VoiceServiceProfile struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- voiceserviceprofileBME = &ManagedEntityDefinition{
- Name: "VoiceServiceProfile",
- ClassID: 58,
- MessageTypes: mapset.NewSetWith(
- Create,
- Delete,
- Get,
- Set,
- SetTable,
- ),
- AllowedAttributeMask: 0xfffc,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
- 1: ByteField("AnnouncementType", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
- 2: Uint16Field("JitterTarget", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 2),
- 3: Uint16Field("JitterBufferMax", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 3),
- 4: ByteField("EchoCancelInd", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
- 5: Uint16Field("PstnProtocolVariant", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
- 6: Uint16Field("DtmfDigitLevels", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 6),
- 7: Uint16Field("DtmfDigitDuration", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 7),
- 8: Uint16Field("HookFlashMinimumTime", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 8),
- 9: Uint16Field("HookFlashMaximumTime", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 9),
- 10: MultiByteField("TonePatternTable", OctetsAttributeType, 0x0040, 20, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 10),
- 11: MultiByteField("ToneEventTable", OctetsAttributeType, 0x0020, 7, toOctets("AAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, true, false, 11),
- 12: MultiByteField("RingingPatternTable", OctetsAttributeType, 0x0010, 5, toOctets("AAAAAAA="), mapset.NewSetWith(Read, Write), false, true, false, 12),
- 13: MultiByteField("RingingEventTable", OctetsAttributeType, 0x0008, 7, toOctets("AAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, true, false, 13),
- 14: Uint16Field("NetworkSpecificExtensionsPointer", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 14),
- },
- Access: CreatedByOlt,
- Support: UnknownSupport,
- }
-}
-
-// NewVoiceServiceProfile (class ID 58) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewVoiceServiceProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*voiceserviceprofileBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/voipapplicationserviceprofile.go b/vendor/github.com/opencord/omci-lib-go/generated/voipapplicationserviceprofile.go
deleted file mode 100644
index 04bf025..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/voipapplicationserviceprofile.go
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// VoipApplicationServiceProfileClassID is the 16-bit ID for the OMCI
-// Managed entity VoIP application service profile
-const VoipApplicationServiceProfileClassID ClassID = ClassID(146)
-
-var voipapplicationserviceprofileBME *ManagedEntityDefinition
-
-// VoipApplicationServiceProfile (class ID #146)
-// The VoIP application service profile defines attributes of calling features used in conjunction
-// with a VoIP line service. It is optional for ONUs that support VoIP services. If a non-OMCI
-// interface is used to manage SIP for VoIP, this ME is unnecessary.
-//
-// An instance of this ME is created and deleted by the OLT. A VoIP application service profile
-// instance is needed for each unique set of profile attributes.
-//
-// Relationships
-// An instance of this ME is associated with zero or more SIP user data MEs.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. (R, setbycreate)
-// (mandatory) (2-bytes)
-//
-// Cid Features
-// The recommended default value is 0x00. (R,-W, setbycreate) (mandatory) (1-byte)
-//
-// Call Waiting Features
-// The recommended default value is 0x00. (R,-W, setbycreate) (mandatory) (1-byte)
-//
-// Call Progress Or Transfer Features
-// The recommended default value is 0x0000. (R,-W, setbycreate) (mandatory) (2-bytes)
-//
-// Call Presentation Features
-// The recommended default value is 0x0000. (R,-W, setbycreate) (mandatory) (2-bytes)
-//
-// Direct Connect Feature
-// The recommended default value is 0x00. (R,-W, setbycreate) (mandatory) (1-byte)
-//
-// Direct Connect Uri Pointer
-// Direct connect URI pointer: This attribute points to a network address ME that specifies the URI
-// of the direct connect. If this attribute is set to a null pointer, no URI is defined. (R,-W,
-// setbycreate) (mandatory) (2-bytes)
-//
-// Bridged Line Agent Uri Pointer
-// Bridged line agent URI pointer: This attribute points to a network address ME that specifies the
-// URI of the bridged line agent. If this attribute is set to a null pointer, no URI is defined.
-// (R,-W, setbycreate) (mandatory) (2-bytes)
-//
-// Conference Factory Uri Pointer
-// Conference factory URI pointer: This attribute points to a network address ME that specifies the
-// URI of the conference factory. If this attribute is set to a null pointer, no URI is defined.
-// (R,-W, setbycreate) (mandatory) (2-bytes)
-//
-// Dial Tone Feature Delay_ W Armline Timer New
-// Dial tone feature delay/warmline timer (new): This attribute defines the warmline timer/dial
-// tone feature delay timer (seconds). The default value 0 specifies vendor-specific
-// implementation. (R,-W) (optional) (2-bytes)
-//
-type VoipApplicationServiceProfile struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- voipapplicationserviceprofileBME = &ManagedEntityDefinition{
- Name: "VoipApplicationServiceProfile",
- ClassID: 146,
- MessageTypes: mapset.NewSetWith(
- Create,
- Delete,
- Get,
- Set,
- ),
- AllowedAttributeMask: 0xff80,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
- 1: ByteField("CidFeatures", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
- 2: ByteField("CallWaitingFeatures", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
- 3: Uint16Field("CallProgressOrTransferFeatures", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
- 4: Uint16Field("CallPresentationFeatures", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
- 5: ByteField("DirectConnectFeature", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
- 6: Uint16Field("DirectConnectUriPointer", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
- 7: Uint16Field("BridgedLineAgentUriPointer", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
- 8: Uint16Field("ConferenceFactoryUriPointer", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
- 9: Uint16Field("DialToneFeatureDelayWArmlineTimerNew", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9),
- },
- Access: CreatedByOlt,
- Support: UnknownSupport,
- }
-}
-
-// NewVoipApplicationServiceProfile (class ID 146) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewVoipApplicationServiceProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*voipapplicationserviceprofileBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/voiplinestatus.go b/vendor/github.com/opencord/omci-lib-go/generated/voiplinestatus.go
deleted file mode 100644
index 214de88..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/voiplinestatus.go
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// VoipLineStatusClassID is the 16-bit ID for the OMCI
-// Managed entity VoIP line status
-const VoipLineStatusClassID ClassID = ClassID(141)
-
-var voiplinestatusBME *ManagedEntityDefinition
-
-// VoipLineStatus (class ID #141)
-// The VoIP line status ME contains line status information for POTS ports using VoIP services. An
-// ONU that supports VoIP automatically creates or deletes an instance of this ME upon creation or
-// deletion of a PPTP POTS UNI.
-//
-// Relationships
-// An instance of this ME is associated with a PPTP POTS UNI.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
-// identical ID, this ME is implicitly linked to an instance of the PPTP POTS UNI. (R) (mandatory)
-// (2-bytes)
-//
-// Voip Codec Used
-// (R) (mandatory) (2-bytes)
-//
-// Voip Voice Server Status
-// (R) (mandatory) (1-byte)
-//
-// Voip Port Session Type
-// (R) (mandatory) (1-byte)
-//
-// Voip Call 1 Packet Period
-// Voip call 1 packet period: This attribute reports the packet period for the first call on the
-// VoIP POTS port. The value is defined in milliseconds. (R) (mandatory) (2-bytes)
-//
-// Voip Call 2 Packet Period
-// Voip call 2 packet period: This attribute reports the packet period for the second call on the
-// VoIP POTS port. The value is defined in milliseconds. (R) (mandatory) (2-bytes)
-//
-// Voip Call 1 Dest Addr
-// Voip call 1 dest addr: This attribute reports the DA for the first call on the VoIP POTS port.
-// The value is an ASCII string. (R) (mandatory) (25-bytes)
-//
-// Voip Call 2 Dest Addr
-// Voip call 2 dest addr: This attribute reports the DA for the second call on the VoIP POTS port.
-// The value is an ASCII string. (R) (mandatory) (25-bytes)
-//
-// Voip Line State
-// (R) (optional) (1 byte)
-//
-// Emergency Call Status
-// (R) (Optional) (1-byte)
-//
-type VoipLineStatus struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- voiplinestatusBME = &ManagedEntityDefinition{
- Name: "VoipLineStatus",
- ClassID: 141,
- MessageTypes: mapset.NewSetWith(
- Get,
- ),
- AllowedAttributeMask: 0xff80,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
- 1: Uint16Field("VoipCodecUsed", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
- 2: ByteField("VoipVoiceServerStatus", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
- 3: ByteField("VoipPortSessionType", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
- 4: Uint16Field("VoipCall1PacketPeriod", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
- 5: Uint16Field("VoipCall2PacketPeriod", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
- 6: MultiByteField("VoipCall1DestAddr", OctetsAttributeType, 0x0400, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 6),
- 7: MultiByteField("VoipCall2DestAddr", OctetsAttributeType, 0x0200, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 7),
- 8: ByteField("VoipLineState", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, true, false, 8),
- 9: ByteField("EmergencyCallStatus", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), true, true, false, 9),
- },
- Access: CreatedByOnu,
- Support: UnknownSupport,
- }
-}
-
-// NewVoipLineStatus (class ID 141) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewVoipLineStatus(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*voiplinestatusBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/xdslchannelconfigurationprofile.go b/vendor/github.com/opencord/omci-lib-go/generated/xdslchannelconfigurationprofile.go
deleted file mode 100644
index 2b1f36d..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/xdslchannelconfigurationprofile.go
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// XdslChannelConfigurationProfileClassID is the 16-bit ID for the OMCI
-// Managed entity xDSL channel configuration profile
-const XdslChannelConfigurationProfileClassID ClassID = ClassID(107)
-
-var xdslchannelconfigurationprofileBME *ManagedEntityDefinition
-
-// XdslChannelConfigurationProfile (class ID #107)
-// This ME contains the channel configuration profile for an xDSL UNI. An instance of this ME is
-// created and deleted by the OLT.
-//
-// NOTE - If [ITUT G.997.1] compatibility is required, bit rates should only be set to integer
-// multiples of 1000-bits/s. The ONU may reject attempts to set other values for bit rate
-// attributes.
-//
-// Relationships
-// An instance of this ME may be associated with zero or more instances of the PPTP xDSL UNI part
-// 1.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. The value 0 is
-// reserved. (R, setbycreate) (mandatory) (2-bytes)
-//
-// Minimum Data Rate
-// Minimum data rate: This parameter specifies the minimum desired net data rate for the bearer
-// channel. It is coded in bits per second. (R,-W, setbycreate) (mandatory) (4-bytes)
-//
-// Maximum Data Rate
-// Maximum data rate: This parameter specifies the maximum desired net data rate for the bearer
-// channel. It is coded in bits per second. (R,-W, setbycreate) (mandatory) (4-bytes)
-//
-// Rate Adaptation Ratio
-// Rate adaptation ratio: This attribute specifies the weight that should be taken into account
-// when performing rate adaptation in the direction of the bearer channel. The attribute is defined
-// as a percentage. The value 20, for example, means that 20% of the available data rate (in excess
-// of the minimum data rate summed over all bearer channels) is assigned to this bearer channel and
-// 80% to the other bearer channels. The OLT must ensure that the sum of rate adaptation ratios
-// over all bearers in one direction is 100%. (R,-W, setbycreate) (optional) (1-byte)
-//
-// Maximum Interleaving Delay
-// The delay is coded in milliseconds, varying from 2 to 63, with special meaning assigned to
-// values 0, 1 and 255. The value 0 indicates that no delay bound is imposed. The value 1 indicates
-// the fast latency path is to be used in the ITUT G.992.1 operating mode and S and D are to be
-// selected such that S- 1 and D-= 1 in ITU-T G.992.2, ITUT G.992.3, ITUT G.992.4, ITUT G.992.5 and
-// ITUT G.993.2 operating modes. The value 255 indicates a delay bound of 1-ms in ITUT-G.993.2
-// operation. (R,-W, setbycreate) (mandatory) (1-byte)
-//
-// Data Rate Threshold Upshift
-// Data rate threshold upshift: This attribute is a threshold on the cumulative data rate upshift
-// achieved over one or more bearer channel data rate adaptations. An upshift rate change (DRT up)
-// notification is issued by the PPTP xDSL UNI part 1 when the actual data rate exceeds the data
-// rate at the last entry into showtime by more than the threshold. The data rate threshold is
-// coded in bits per second. (R,-W, setbycreate) (mandatory for xDSL standards that use this
-// attribute) (4-bytes)
-//
-// Data Rate Threshold Downshift
-// Data rate threshold downshift: This attribute is a threshold on the cumulative data rate
-// downshift achieved over one or more bearer channel data rate adaptations. A downshift rate
-// change (DRT down) notification is issued by the PPTP xDSL UNI part 1 when the actual data rate
-// is below the data rate at the last entry into showtime by more than the threshold. The data rate
-// threshold is coded in bits per second. (R,-W, setbycreate) (mandatory for xDSL standards that
-// use this attribute) (4-bytes)
-//
-// Minimum Reserved Data Rate
-// Minimum reserved data rate: This attribute specifies the desired minimum reserved net data rate
-// for the bearer channel. The rate is coded in bits per second. This attribute is needed only if
-// the rate adaptation mode is set to dynamic in the xDSL line configuration profile part 1. (R,-W,
-// setbycreate) (optional) (4-bytes)
-//
-// Minimum Data Rate In Low _ Power State
-// Minimum data rate in low-power state: This parameter specifies the minimum desired net data rate
-// for the bearer channel during the low-power state (L1/L2). The power management low-power states
-// L1 and L2 are defined in [ITUT-G.992.2] and [ITUT G.992.3], respectively. The data rate is coded
-// in bits per second. (R,-W, setbycreate) (mandatory) (4-byte)
-//
-// Minimum Impulse Noise Protection
-// (R,-W, setbycreate) (optional for [ITU-T G.992.1], mandatory for other xDSL standards that use
-// this attribute) (1-byte)
-//
-// Maximum Bit Error Ratio
-// (R,-W, setbycreate) (mandatory for standards that use this attribute) (1-byte)
-//
-// Minimum Impulse Noise Protection 8_Khz
-// Minimum impulse noise protection 8-kHz: The INPmin8 attribute specifies the minimum INP for the
-// bearer channel if it is transported over DMT symbols with a subcarrier spacing of 8.625-kHz. It
-// is only valid for [ITUT-G.993.2]. INP is expressed in DMT symbols with a subcarrier spacing of
-// 8.625-kHz. It can take any integer value from 0 (default) to 16, inclusive. (R, W) (mandatory
-// for [ITUT-G.993.2]) (1 byte)
-//
-// Maximum Delay Variation
-// Maximum delay variation: The DVMAX attribute specifies the maximum value for delay variation
-// allowed in an OLR procedure. Its value ranges from 1 (0.1-ms) to 254 (25.4-ms). The special
-// value 255 specifies that no delay variation bound is imposed. (R, W) (optional: used by
-// [ITUT-G.993.2]) (1 byte)
-//
-// Channel Initialization Policy Selection
-// Channel initialization policy selection: The CIPOLICY attribute specifies the policy to
-// determine transceiver configuration at initialization. Valid values are 0..1, as defined in the
-// Recommendations that use this attribute. (R,-W) (optional) (1-byte)
-//
-// Minimum Sos Bit Rate Downstream
-// Minimum SOS bit rate downstream: The MIN-SOS-BR-ds attribute specifies the minimum net data rate
-// required for a valid SOS request in the downstream direction. The value is coded as an unsigned
-// integer representing the data rate as a multiple of 8-kbit/s. (R,-W) (optional) (4-bytes)
-//
-// Minimum Sos Bit Rate Upstream
-// Minimum SOS bit rate upstream: The MIN-SOS-BR-us attribute specifies the minimum net data rate
-// required for a valid SOS request in the upstream direction. The value is coded as an unsigned
-// integer representing the data rate as a multiple of 8-kbit/s. (R,-W) (optional) (4-bytes)
-//
-type XdslChannelConfigurationProfile struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- xdslchannelconfigurationprofileBME = &ManagedEntityDefinition{
- Name: "XdslChannelConfigurationProfile",
- ClassID: 107,
- MessageTypes: mapset.NewSetWith(
- Create,
- Delete,
- Get,
- Set,
- ),
- AllowedAttributeMask: 0xfffe,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
- 1: Uint32Field("MinimumDataRate", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
- 2: Uint32Field("MaximumDataRate", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
- 3: ByteField("RateAdaptationRatio", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 3),
- 4: ByteField("MaximumInterleavingDelay", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
- 5: Uint32Field("DataRateThresholdUpshift", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
- 6: Uint32Field("DataRateThresholdDownshift", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
- 7: Uint32Field("MinimumReservedDataRate", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 7),
- 8: Uint32Field("MinimumDataRateInLowPowerState", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
- 9: ByteField("MinimumImpulseNoiseProtection", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 9),
- 10: ByteField("MaximumBitErrorRatio", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10),
- 11: ByteField("MinimumImpulseNoiseProtection8Khz", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, Write), false, false, false, 11),
- 12: ByteField("MaximumDelayVariation", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, false, false, 12),
- 13: ByteField("ChannelInitializationPolicySelection", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, Write), false, true, false, 13),
- 14: Uint32Field("MinimumSosBitRateDownstream", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), false, true, false, 14),
- 15: Uint32Field("MinimumSosBitRateUpstream", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read, Write), false, true, false, 15),
- },
- Access: CreatedByOlt,
- Support: UnknownSupport,
- }
-}
-
-// NewXdslChannelConfigurationProfile (class ID 107) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewXdslChannelConfigurationProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*xdslchannelconfigurationprofileBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/xdslchanneldownstreamstatusdata.go b/vendor/github.com/opencord/omci-lib-go/generated/xdslchanneldownstreamstatusdata.go
deleted file mode 100644
index 08adc36..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/xdslchanneldownstreamstatusdata.go
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// XdslChannelDownstreamStatusDataClassID is the 16-bit ID for the OMCI
-// Managed entity xDSL channel downstream status data
-const XdslChannelDownstreamStatusDataClassID ClassID = ClassID(102)
-
-var xdslchanneldownstreamstatusdataBME *ManagedEntityDefinition
-
-// XdslChannelDownstreamStatusData (class ID #102)
-// This ME contains downstream channel status data for an xDSL UNI. The ONU automatically creates
-// or deletes instances of this ME upon the creation or deletion of a PPTP xDSL UNI part 1.
-//
-// NOTE - [ITU-T G.997.1] specifies that bit rate attributes have a granularity of 1000-bit/s. If
-// ITU-T G.997.1 compliance is required, the ONU should only report values with this granularity.
-//
-// Relationships
-// One or more instances of this ME are associated with an instance of an xDSL UNI.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. The two MSBs of
-// the first byte are the bearer channel ID. Excluding the first 2-bits of the first byte, the
-// remaining part of the ME ID is identical to that of this ME's parent PPTP xDSL UNI part 1. (R)
-// (mandatory) (2-bytes)
-//
-// Actual Interleaving Delay
-// Actual interleaving delay: This attribute is the actual one-way interleaving delay introduced by
-// the PMS-TC between the alpha and beta reference points, excluding delay in the L1 and L2 states.
-// In the L1 and L2 states, the attribute contains the interleaving delay in the previous L0 state.
-// For ADSL, this attribute is derived from the S and D attributes as cap(S*D)/4 ms, where S is the
-// number of symbols per codeword, D is the interleaving depth and cap() denotes rounding to the
-// next higher integer. For [ITU-T G.993.2], this attribute is computed according to the formula in
-// clause 9.7 of [ITUT-G.993.2]. The actual interleaving delay is coded in milliseconds, rounded to
-// the nearest millisecond. (R) (mandatory) (1-byte)
-//
-// Actual Data Rate
-// Actual data rate: This parameter reports the actual net data rate of the bearer channel,
-// excluding the rate in the L1 and L2 states. In the L1 or L2 state, the parameter contains the
-// net data rate in the previous L0 state. The data rate is coded in bits per second. (R)
-// (mandatory) (4-bytes)
-//
-// Previous Data Rate
-// Previous data rate: This parameter reports the previous net data rate of the bearer channel just
-// before the latest rate change event occurred, excluding transitions between the L0 state and the
-// L1 or L2 states. A rate change can occur at a power management state transition, e.g., at full
-// or short initialization, fast retrain or power down, or at a dynamic rate adaptation. The rate
-// is coded in bits per second (R) (mandatory) (4-bytes)
-//
-// Actual Impulse Noise Protection
-// Actual impulse noise protection: The ACTINP attribute reports the actual INP on the bearer
-// channel in the L0 state. In the L1 or L2 state, the attribute contains the INP in the previous
-// L0 state. The value of this attribute is a number of DMT symbols, with a granularity of 0.1
-// symbols. Its range is from 0 (0.0 symbols) to 254 (25.4 symbols). The special value 255
-// indicates an ACTINP higher than 25.4. (R) (optional for [ITU-T G.992.1], mandatory for other
-// xDSL Recommendations that support this attribute) (1-byte)
-//
-// Actual Size Of Reed_Solomon Codeword
-// Actual size of Reed-Solomon codeword: The NFEC attribute reports the actual Reed-Solomon
-// codeword size used in the latency path in which the bearer channel is transported. The value is
-// coded in bytes, and ranges from 0..255. (R) (mandatory for ITUT-G.993.2 VDSL2, optional for
-// others) (1-byte)
-//
-// Actual Number Of Reed_Solomon Redundancy Bytes
-// Actual number of Reed-Solomon redundancy bytes: The RFEC attribute reports the actual number of
-// Reed-Solomon redundancy bytes per codeword used in the latency path in which the bearer channel
-// is transported. The value is coded in bytes, and ranges from 0..16. The value 0 indicates no
-// Reed-Solomon coding. (R) (mandatory for ITUT-G.993.2 VDSL2, optional for others) (1-byte)
-//
-// Actual Number Of Bits Per Symbol
-// Actual number of bits per symbol: The LSYMB attribute reports the actual number of bits per
-// symbol assigned to the latency path in which the bearer channel is transported, excluding
-// trellis overhead. The value is coded in bits, and ranges from 0..65535. (R) (mandatory for [TU-T
-// G.993.2 VDSL2, optional for others) (2-bytes)
-//
-// Actual Interleaving Depth
-// Actual interleaving depth: The INTLVDEPTH attribute reports the actual depth of the interleaver
-// used in the latency path in which the bearer channel is transported. The value ranges from
-// 1..4096 in steps of 1. The value 1 indicates no interleaving. (R) (mandatory for ITU-T G.993.2
-// VDSL2, optional for others) (2-bytes)
-//
-// Actual Interleaving Block Length
-// Actual interleaving block length: The INTLVBLOCK attribute reports the actual block length of
-// the interleaver used in the latency path in which the bearer channel is transported. The value
-// ranges from 4..255 in steps of 1. (R) (mandatory for ITU-T G.993.2 VDSL2, undefined for others)
-// (1-byte)
-//
-// Actual Latency Path
-// Actual latency path: The LPATH attribute reports the index of the actual latency path in which
-// the bearer channel is transported. Valid values are 0..3. In [ITUT-G.992.1], the fast path is
-// mapped to latency index 0; the interleaved path to index 1. (R) (mandatory for ITU-T G.993.2
-// VDSL2, optional for others) (1-byte)
-//
-// Actual Impulse Noise Protection Against R Epetitive E Lectrical I Mpulse N Oise Actinp_Rein
-// Actual impulse noise protection against repetitive electrical impulse noise (ACTINP_REIN): If
-// retransmission is used in a given transmit direction, this parameter reports the actual INP
-// against REIN on the bearer channel. The INP of this attribute is equal to the integer value
-// multiplied by 0.1 symbols. Valid values and usage are given in clause 7.5.2.9 of [ITU-T G.997.1]
-// (R) (optional) (1-byte)
-//
-type XdslChannelDownstreamStatusData struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- xdslchanneldownstreamstatusdataBME = &ManagedEntityDefinition{
- Name: "XdslChannelDownstreamStatusData",
- ClassID: 102,
- MessageTypes: mapset.NewSetWith(
- Get,
- ),
- AllowedAttributeMask: 0xffe0,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
- 1: ByteField("ActualInterleavingDelay", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
- 2: Uint32Field("ActualDataRate", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
- 3: Uint32Field("PreviousDataRate", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
- 4: ByteField("ActualImpulseNoiseProtection", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
- 5: ByteField("ActualSizeOfReedSolomonCodeword", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
- 6: ByteField("ActualNumberOfReedSolomonRedundancyBytes", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
- 7: Uint16Field("ActualNumberOfBitsPerSymbol", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
- 8: Uint16Field("ActualInterleavingDepth", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
- 9: ByteField("ActualInterleavingBlockLength", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
- 10: ByteField("ActualLatencyPath", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
- 11: ByteField("ActualImpulseNoiseProtectionAgainstREpetitiveELectricalIMpulseNOiseActinpRein", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, true, false, 11),
- },
- Access: CreatedByOnu,
- Support: UnknownSupport,
- }
-}
-
-// NewXdslChannelDownstreamStatusData (class ID 102) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewXdslChannelDownstreamStatusData(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*xdslchanneldownstreamstatusdataBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/xdslchannelupstreamstatusdata.go b/vendor/github.com/opencord/omci-lib-go/generated/xdslchannelupstreamstatusdata.go
deleted file mode 100644
index ed64b7e..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/xdslchannelupstreamstatusdata.go
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// XdslChannelUpstreamStatusDataClassID is the 16-bit ID for the OMCI
-// Managed entity xDSL channel upstream status data
-const XdslChannelUpstreamStatusDataClassID ClassID = ClassID(103)
-
-var xdslchannelupstreamstatusdataBME *ManagedEntityDefinition
-
-// XdslChannelUpstreamStatusData (class ID #103)
-// This ME contains upstream channel status data for an xDSL UNI. The ONU automatically creates or
-// deletes instances of this ME upon the creation or deletion of a PPTP xDSL UNI part 1.
-//
-// Relationships
-// One or more instances of this ME are associated with an instance of an xDSL UNI.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. The two MSBs of
-// the first byte are the bearer channel ID. Excluding the first 2-bits of the first byte, the
-// remaining part of the ME ID is identical to that of this ME's parent PPTP xDSL UNI part 1. (R)
-// (mandatory) (2-bytes)
-//
-// Actual Interleaving Delay
-// Actual interleaving delay: This attribute is the actual one-way interleaving delay introduced by
-// the PMS-TC between the alpha and beta reference points, excluding the L1 and L2 states. In the
-// L1 and L2 states, this attribute contains the interleaving delay in the previous L0 state. For
-// ADSL, this attribute is derived from the S and D attributes as cap(S*D)/4-ms, where S is the
-// number of symbols per codeword, D is the interleaving depth and cap() denotes rounding to the
-// next higher integer. For [ITU-T G.993.2], this attribute is computed according to the formula in
-// clause 9.7 of [ITUT G.993.2]. The actual interleaving delay is coded in milliseconds, rounded to
-// the nearest millisecond. (R) (mandatory) (1-byte)
-//
-// Actual Data Rate
-// Actual data rate: This parameter reports the actual net data rate of the bearer channel,
-// excluding the L1 and L2 states. In the L1 or L2 state, the parameter contains the net data rate
-// in the previous L0 state. The data rate is coded in bits per second. (R) (mandatory) (4-bytes)
-//
-// Previous Data Rate
-// Previous data rate: This parameter reports the previous net data rate of the bearer channel just
-// before the latest rate change event occurred, excluding transitions between the L0 state and the
-// L1 or L2 state. A rate change can occur at a power management state transition, e.g., at full or
-// short initialization, fast retrain or power down, or at a dynamic rate adaptation. The rate is
-// coded in bits per second. (R) (mandatory) (4-bytes)
-//
-// Actual Impulse Noise Protection
-// Actual impulse noise protection: The ACTINP attribute reports the actual INP on the bearer
-// channel in the L0 state. In the L1 or L2 state, the attribute contains the INP in the previous
-// L0 state. The value is coded in fractions of DMT symbols with a granularity of 0.1 symbols. The
-// range is from 0 (0.0 symbols) to 254 (25.4 symbols). The special value 255 indicates an ACTINP
-// higher than 25.4. (R) (mandatory for ITU-T G.993.2 VDSL2, optional for other xDSL
-// Recommendations that support it) (1-byte)
-//
-// Impulse Noise Protection Reporting Mode
-// Impulse noise protection reporting mode: The INPREPORT attribute reports the method used to
-// compute the ACTINP. If set to 0, the ACTINP is computed according to the INP_no_erasure formula
-// (clause 9.6 of [ITUT G.993.2]). If set to 1, ACTINP is the value estimated by the xTU receiver.
-// (R) (mandatory for ITU-T G.993.2 VDSL2) (1-byte)
-//
-// Actual Size Of Reed_Solomon Codeword
-// Actual size of Reed-Solomon codeword: The NFEC attribute reports the actual Reed-Solomon
-// codeword size used in the latency path in which the bearer channel is transported. Its value is
-// coded in bytes in the range 0..255. (R) (mandatory for ITU-T G.993.2 VDSL2, optional for others)
-// (1-byte)
-//
-// Actual Number Of Reed_Solomon Redundancy Bytes
-// Actual number of Reed-Solomon redundancy bytes: The RFEC attribute reports the actual number of
-// Reed-Solomon redundancy bytes per codeword used in the latency path in which the bearer channel
-// is transported. Its value is coded in bytes in the range 0..16. The value 0 indicates no Reed-
-// Solomon coding. (R) (mandatory for ITUT-G.993.2 VDSL2, optional for others) (1-byte)
-//
-// Actual Number Of Bits Per Symbol
-// Actual number of bits per symbol: The LSYMB attribute reports the actual number of bits per
-// symbol assigned to the latency path in which the bearer channel is transported, excluding
-// trellis overhead. Its value is coded in bits in the range 0..65535. (R) (mandatory for
-// ITUT-G.993.2 VDSL2, optional for others) (2-bytes)
-//
-// Actual Interleaving Depth
-// Actual interleaving depth: The INTLVDEPTH attribute reports the actual depth of the interleaver
-// used in the latency path in which the bearer channel is transported. Its value ranges from
-// 1..4096 in steps of 1. The value 1 indicates no interleaving. (R) (mandatory for ITU-T G.993.2
-// VDSL2, optional for others) (2-bytes)
-//
-// Actual Interleaving Block Length
-// Actual interleaving block length: The INTLVBLOCK attribute reports the actual block length of
-// the interleaver used in the latency part in which the bearer channel is transported. Its value
-// ranges from 4..255 in steps of 1. (R) (mandatory forITU-T G.993.2 VDSL2, optional for others)
-// (1-byte)
-//
-// Actual Latency Path
-// Actual latency path: The LPATH attribute reports the index of the actual latency path in which
-// the bearer channel is transported. Valid values are 0..3. In [ITUT-G.992.1], the fast path is
-// mapped to latency index 0; the interleaved path to index 1. (R) (mandatory for ITU-T G.993.2
-// VDSL2, optional for others) (1-byte)
-//
-type XdslChannelUpstreamStatusData struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- xdslchannelupstreamstatusdataBME = &ManagedEntityDefinition{
- Name: "XdslChannelUpstreamStatusData",
- ClassID: 103,
- MessageTypes: mapset.NewSetWith(
- Get,
- ),
- AllowedAttributeMask: 0xffe0,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
- 1: ByteField("ActualInterleavingDelay", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
- 2: Uint32Field("ActualDataRate", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
- 3: Uint32Field("PreviousDataRate", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
- 4: ByteField("ActualImpulseNoiseProtection", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
- 5: ByteField("ImpulseNoiseProtectionReportingMode", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
- 6: ByteField("ActualSizeOfReedSolomonCodeword", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
- 7: ByteField("ActualNumberOfReedSolomonRedundancyBytes", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
- 8: Uint16Field("ActualNumberOfBitsPerSymbol", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
- 9: Uint16Field("ActualInterleavingDepth", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
- 10: ByteField("ActualInterleavingBlockLength", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
- 11: ByteField("ActualLatencyPath", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
- },
- Access: CreatedByOnu,
- Support: UnknownSupport,
- }
-}
-
-// NewXdslChannelUpstreamStatusData (class ID 103) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewXdslChannelUpstreamStatusData(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*xdslchannelupstreamstatusdataBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/xdsldownstreamrfibandsprofile.go b/vendor/github.com/opencord/omci-lib-go/generated/xdsldownstreamrfibandsprofile.go
deleted file mode 100644
index 2e017e9..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/xdsldownstreamrfibandsprofile.go
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// XdslDownstreamRfiBandsProfileClassID is the 16-bit ID for the OMCI
-// Managed entity xDSL downstream RFI bands profile
-const XdslDownstreamRfiBandsProfileClassID ClassID = ClassID(111)
-
-var xdsldownstreamrfibandsprofileBME *ManagedEntityDefinition
-
-// XdslDownstreamRfiBandsProfile (class ID #111)
-// This ME contains the downstream RFI bands profile for an xDSL UNI. Instances of this ME are
-// created and deleted by the OLT.
-//
-// Relationships
-// An instance of this ME may be associated with zero or more instances of the PPTP xDSL UNI part
-// 1.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. The value 0 is
-// reserved. (R, setbycreate) (mandatory) (2-bytes)
-//
-// Downstream Rfi Bands Table
-// (R,-W) (mandatory for [ITU-T G.992.5], [ITU-T G.993.2]) (5 * N bytes where N is the number of
-// RFI bands)
-//
-// Bands Valid
-// (R,-W) (mandatory) (1-byte)
-//
-type XdslDownstreamRfiBandsProfile struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- xdsldownstreamrfibandsprofileBME = &ManagedEntityDefinition{
- Name: "XdslDownstreamRfiBandsProfile",
- ClassID: 111,
- MessageTypes: mapset.NewSetWith(
- Create,
- Delete,
- Get,
- GetNext,
- Set,
- SetTable,
- ),
- AllowedAttributeMask: 0xc000,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
- 1: TableField("DownstreamRfiBandsTable", TableAttributeType, 0x8000, TableInfo{nil, 5}, mapset.NewSetWith(Read, Write), false, false, false, 1),
- 2: ByteField("BandsValid", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
- },
- Access: CreatedByOlt,
- Support: UnknownSupport,
- }
-}
-
-// NewXdslDownstreamRfiBandsProfile (class ID 111) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewXdslDownstreamRfiBandsProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*xdsldownstreamrfibandsprofileBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/xdsllineinventoryandstatusdatapart2.go b/vendor/github.com/opencord/omci-lib-go/generated/xdsllineinventoryandstatusdatapart2.go
deleted file mode 100644
index 361203f..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/xdsllineinventoryandstatusdatapart2.go
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// XdslLineInventoryAndStatusDataPart2ClassID is the 16-bit ID for the OMCI
-// Managed entity xDSL line inventory and status data part 2
-const XdslLineInventoryAndStatusDataPart2ClassID ClassID = ClassID(101)
-
-var xdsllineinventoryandstatusdatapart2BME *ManagedEntityDefinition
-
-// XdslLineInventoryAndStatusDataPart2 (class ID #101)
-// This ME contains part 2 of the line inventory and status data for an xDSL UNI. The ONU
-// automatically creates or deletes an instance of this ME upon the creation or deletion of a PPTP
-// xDSL UNI part 1.
-//
-// NOTE 1 - [ITU-T G.997.1] specifies that bit rate attributes have granularity of 1000-bit/s. If
-// ITUT-G.997.1 compliance is required, the ONU should only report values with this granularity.
-//
-// Relationships
-// An instance of this ME is associated with an xDSL UNI.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
-// identical ID, this ME is implicitly linked to an instance of the PPTP xDSL UNI part 1. (R)
-// (mandatory) (2-bytes)
-//
-// Xdsl Transmission System
-// NOTE 2 - This attribute is only 7-bytes long. An eighth byte identifying VDSL2 capabilities in
-// use is defined in the VDSL2 line inventory and status data part 1 ME.
-//
-// Line Power Management State
-// (R) (mandatory) (1-byte)
-//
-// Downstream Line Attenuation
-// NOTE 3 - [ITU-T G.993.2] specifies a per-band array to represent this attribute. The array is
-// defined in the VDSL2 line inventory and status data part 3 ME. In an ITU-T G.993.2 context, the
-// downstream line attenuation attribute should be set to 0 here, and populated in the VDSL2 line
-// inventory and status data part 3 ME instead.
-//
-// Upstream Line Attenuation
-// NOTE 4 - [ITU-T G.993.2] specifies a per-band array to represent this attribute. The array is
-// defined in the VDSL2 line inventory and status data part 3 ME. In an ITU-T G.993.2 context, the
-// upstream line attenuation attribute should be set to 0 here, and populated in the VDSL2 line
-// inventory and status data part 3 ME instead.
-//
-// Downstream Signal Attenuation
-// NOTE 6 - [ITU-T G.993.2] specifies a per-band array to represent this attribute. The array is
-// defined in the VDSL2 line inventory and status data part 3 ME. In an ITU-T G.993.2 context, the
-// downstream signal attenuation attribute should be set to 0 here, and populated in the VDSL2 line
-// inventory and status data part 3 ME instead.
-//
-// Upstream Signal Attenuation
-// NOTE 8 - [ITU-T G.993.2] specifies a per-band array to represent this attribute. The array is
-// defined in the VDSL2 line inventory and status data part 3 ME. In an ITU-T G.993.2 context, the
-// upstream signal attenuation attribute should be set to 0 here, and populated in the VDSL2 line
-// inventory and status data part 3 ME instead.
-//
-// Downstream Snr Ratio Margin
-// Downstream SNR ratio margin: The downstream SNR margin SNRMds is the maximum increase of noise
-// power received at the xTUR, such that the BER requirements can still be met for all downstream
-// bearer channels. The attribute value ranges from 0 (-64.0 dB) to 1270 (+63.0-dB). The special
-// value 0xFFFF indicates that the attribute is out of range (R) (mandatory) (2-bytes)
-//
-// Upstream Snr Margin
-// Upstream SNR margin: The upstream SNR margin SNRMus is the maximum increase of noise power
-// received at the xTUC, such that the BER requirements can still be met for all upstream bearer
-// channels. The attribute value ranges from 0 (-64.0 dB) to 1270 (+63.0 dB). The special value
-// 0xFFFF indicates that the attribute is out of range. (R) (mandatory) (2-bytes)
-//
-// Downstream Maximum Attainable Data Rate
-// Downstream maximum attainable data rate: The ATTNDRds attribute indicates the maximum downstream
-// net data rate currently attainable. The rate is coded in bits per second. (R) (mandatory)
-// (4-bytes)
-//
-// Upstream Maximum Attainable Data Rate
-// Upstream maximum attainable data rate: The ATTNDRus attribute indicates the maximum upstream net
-// data rate currently attainable. The rate is coded in bits per second. (R) (mandatory) (4-bytes)
-//
-// Downstream Actual Power Spectrum Density
-// Downstream actual power spectrum density: The ACTPSDds attribute is the average downstream
-// transmit power spectrum density over the subcarriers in use (subcarriers to which downstream
-// user data are allocated) delivered by the xTUC at the UC reference point, at the instant of
-// measurement. The attribute value ranges from 0 (-90.0-dBm/Hz) to 900 (0.0-dBm/Hz). The special
-// value (0xFFFF) indicates that the parameter is out of range. (R) (mandatory) (2-bytes)
-//
-// Upstream Actual Power Spectrum Density
-// Upstream actual power spectrum density: The ACTPSDus attribute is the average upstream transmit
-// power spectrum density over the subcarriers in use (subcarriers to which upstream user data are
-// allocated) delivered by the xTUR at the UR reference point, at the instant of measurement. The
-// attribute value ranges from 0 (-90.0-dBm/Hz) to 900 (0.0-dBm/Hz). The special value 0xFFFF
-// indicates that the attribute is out of range. (R) (mandatory) (2-bytes)
-//
-// Downstream Actual Aggregate Transmit Power
-// NOTE 9 - The downstream nominal aggregate transmit power may be taken as a best estimate of the
-// parameter.
-//
-// Upstream Actual Aggregate Transmit Power
-// NOTE 10 - The upstream nominal aggregate transmit power may be taken as a best estimate of the
-// parameter.
-//
-// Initialization _ Last State Transmitted Downstream
-// (R) (mandatory) (1-byte)
-//
-// Initialization _ Last State Transmitted Upstream
-// (R) (mandatory) (1-byte)
-//
-type XdslLineInventoryAndStatusDataPart2 struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- xdsllineinventoryandstatusdatapart2BME = &ManagedEntityDefinition{
- Name: "XdslLineInventoryAndStatusDataPart2",
- ClassID: 101,
- MessageTypes: mapset.NewSetWith(
- Get,
- ),
- AllowedAttributeMask: 0xffff,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
- 1: MultiByteField("XdslTransmissionSystem", OctetsAttributeType, 0x8000, 7, toOctets("AAAAAAAAAA=="), mapset.NewSetWith(Read), false, false, false, 1),
- 2: ByteField("LinePowerManagementState", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
- 3: Uint16Field("DownstreamLineAttenuation", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
- 4: Uint16Field("UpstreamLineAttenuation", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
- 5: Uint16Field("DownstreamSignalAttenuation", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
- 6: Uint16Field("UpstreamSignalAttenuation", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
- 7: Uint16Field("DownstreamSnrRatioMargin", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
- 8: Uint16Field("UpstreamSnrMargin", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
- 9: Uint32Field("DownstreamMaximumAttainableDataRate", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
- 10: Uint32Field("UpstreamMaximumAttainableDataRate", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
- 11: Uint16Field("DownstreamActualPowerSpectrumDensity", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
- 12: Uint16Field("UpstreamActualPowerSpectrumDensity", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
- 13: Uint16Field("DownstreamActualAggregateTransmitPower", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
- 14: Uint16Field("UpstreamActualAggregateTransmitPower", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
- 15: ByteField("InitializationLastStateTransmittedDownstream", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
- 16: ByteField("InitializationLastStateTransmittedUpstream", UnsignedIntegerAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16),
- },
- Access: CreatedByOnu,
- Support: UnknownSupport,
- }
-}
-
-// NewXdslLineInventoryAndStatusDataPart2 (class ID 101) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewXdslLineInventoryAndStatusDataPart2(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*xdsllineinventoryandstatusdatapart2BME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/xdsllineinventoryandstatusdatapart5.go b/vendor/github.com/opencord/omci-lib-go/generated/xdsllineinventoryandstatusdatapart5.go
deleted file mode 100644
index c4f3aca..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/xdsllineinventoryandstatusdatapart5.go
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// XdslLineInventoryAndStatusDataPart5ClassID is the 16-bit ID for the OMCI
-// Managed entity xDSL line inventory and status data part 5
-const XdslLineInventoryAndStatusDataPart5ClassID ClassID = ClassID(325)
-
-var xdsllineinventoryandstatusdatapart5BME *ManagedEntityDefinition
-
-// XdslLineInventoryAndStatusDataPart5 (class ID #325)
-// This ME extends the attributes defined in the xDSL line inventory and status data parts 1..4.
-// This ME reports FEXT and NEXT attributes, and pertains to Annex C of [ITUT G.992.3] (ADSL2) and
-// Annex C of [ITUT G.992.5] (ADSL2plus).
-//
-// Relationships
-// This is one of the status data MEs associated with an xDSL UNI. The ONU automatically creates or
-// deletes an instance of this ME upon creation or deletion of a PPTP xDSL UNI part 1 that supports
-// these attributes.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. Through an
-// identical ID, this ME is implicitly linked to an instance of the PPTP xDSL UNI part 1 ME. (R)
-// (mandatory) (2-bytes)
-//
-// Fext Downstream Snr Margin
-// FEXT downstream SNR margin: The FEXT SNRMds attribute is the downstream SNR margin measured
-// during FEXTR duration at the ATU-R. The attribute value ranges from 0 (-64.0-dB) to 1270
-// (+63.0-dB). The special value 0xFFFF indicates that the attribute is out of range. (R)
-// (mandatory) (2-bytes)
-//
-// Next Downstream Snr Margin
-// NEXT downstream SNR margin: The NEXT SNRMds attribute is the downstream SNR margin measured
-// during NEXTR duration at the ATU-R. The attribute value ranges from 0 (-64.0-dB) to 1270
-// (+63.0-dB). The special value 0xFFFF indicates that the attribute is out of range. (R)
-// (mandatory) (2-bytes)
-//
-// Fext Upstream Snr Margin
-// FEXT upstream SNR margin: The FEXT SNRMus attribute is the upstream SNR margin (see clause
-// 7.5.1.16 of [ITUT G.997.1]) measured during FEXTC duration at the ATU-C. The attribute value
-// ranges from 0 (-64.0-dB) to 1270 (+63.0-dB). The special value 0xFFFF indicates that the
-// attribute is out of range. (R) (mandatory) (2-bytes)
-//
-// Next Upstream Snr Margin
-// NEXT upstream SNR margin: The NEXT SNRMus attribute is the upstream SNR margin (see clause
-// 7.5.1.16 of [ITUT-G.997.1]) measured during NEXTC duration at the ATU-C. The attribute value
-// ranges from 0 (-64.0-dB) to 1270 (+63.0-dB). The special value 0xFFFF indicates that the
-// attribute is out of range. (R) (mandatory) (2-bytes)
-//
-// Fext Downstream Maximum Attainable Data Rate
-// FEXT downstream maximum attainable data rate: The FEXT ATTNDRds attribute is the maximum
-// downstream net data rate calculated from FEXT downstream SNR(f) (see clause 7.5.1.28.3.1 of
-// [ITUT G.997.1]). The rate is coded in bits per second. (R) (mandatory) (4-bytes)
-//
-// Next Downstream Maximum Attainable Data Rate
-// NEXT downstream maximum attainable data rate: The NEXT ATTNDRds attribute is the maximum
-// downstream net data rate calculated from NEXT downstream SNR(f) (see clause 7.5.1.28.3.2 of
-// [ITUT G.997.1]). The rate is coded in bits per second. (R) (mandatory) (4-bytes)
-//
-// Fext Upstream Maximum Attainable Data Rate
-// FEXT upstream maximum attainable data rate: The FEXT ATTNDRus attribute is the maximum upstream
-// net data rate calculated from FEXT upstream SNR(f) (see clause 7.5.1.28.6.1 of [ITUT G.997.1]).
-// The rate is coded in bits per second. (R) (mandatory) (4-bytes)
-//
-// Next Upstream Maximum Attainable Data Rate
-// NEXT upstream maximum attainable data rate: The NEXT ATTNDRus attribute is the maximum upstream
-// net data rate calculated from NEXT upstream SNR(f) (see clause 7.5.1.28.6.2 of [ITUT G.997.1]).
-// The rate is coded in bits per second. (R) (mandatory) (4-bytes)
-//
-// Fext Downstream Actual Power Spectral Density
-// FEXT downstream actual power spectral density: The FEXT ACTPSDds attribute is the average
-// downstream transmit PSD over the used subcarriers (see clause-7.5.1.21.1 of [ITUT G.997.1])
-// calculated from the REFPSDds and RMSGIds for FEXTR duration. The attribute value ranges from 0
-// (-90.0-dBm/Hz) to 900 (0.0-dBm/Hz). The special value 0xFFFF indicates that the parameter is out
-// of range. (R) (mandatory) (2-bytes)
-//
-// Next Downstream Actual Power Spectral Density
-// NEXT downstream actual power spectral density: The NEXT ACTPSDds attribute is the average
-// downstream transmit PSD over the used subcarriers (see clause-7.5.1.21.2 of [ITUT G.997.1])
-// calculated from the REFPSDds and RMSGIds for NEXTR duration. The attribute value ranges from 0
-// (-90.0-dBm/Hz) to 900 (0.0-dBm/Hz). The special value 0xFFFF indicates that the parameter is out
-// of range. (R) (mandatory) (2-bytes)
-//
-// Fext Upstream Actual Power Spectral Density
-// FEXT upstream actual power spectral density: The FEXT ACTPSDus attribute is the average upstream
-// transmit PSD over the used subcarriers (see clause-7.5.1.22.1 of [ITUT G.997.1]) calculated from
-// the REFPSDus and RMSGIus for FEXTC duration. The attribute value ranges from 0 (-90.0-dBm/Hz) to
-// 900 (0.0-dBm/Hz). The special value 0xFFFF indicates that the parameter is out of range. (R)
-// (mandatory) (2-bytes)
-//
-// Next Upstream Actual Power Spectral Density
-// NEXT upstream actual power spectral density: The NEXT ACTPSDus attribute is the average upstream
-// transmit PSD over the used subcarriers (see clause-7.5.1.22.2 of [ITUT G.997.1]) calculated from
-// the REFPSDus and RMSGIus for NEXTC duration. The attribute value ranges from 0 (-90.0-dBm/Hz) to
-// 900 (0.0-dBm/Hz). The special value 0xFFFF indicates that the parameter is out of range. (R)
-// (mandatory) (2-bytes)
-//
-// Fext Downstream Actual Aggregate Transmit Power
-// FEXT downstream actual aggregate transmit power: The FEXT ACTATPds attribute is the total amount
-// of transmit power (see clause 7.5.1.24.1 of [ITUT G.997.1]) calculated from PSDds measured
-// during FEXTR duration at the ATU-R. The attribute value ranges from 0 (-31.0-dBm) to 620
-// (+31.0-dBm). The special value 0xFFFF indicates that the parameter is out of range. (R)
-// (mandatory) (2-bytes)
-//
-// Next Downstream Actual Aggregate Transmit Power
-// NEXT downstream actual aggregate transmit power: The NEXT ACTATPds attribute is the total amount
-// of transmit power (see clause 7.5.1.24.2 of [ITUT G.997.1]) calculated from PSDds measured
-// during NEXTR duration at the ATU-R. The attribute value ranges from 0 (-31.0-dBm) to 620
-// (+31.0-dBm). The special value 0xFFFF indicates that the parameter is out of range. (R)
-// (mandatory) (2-bytes)
-//
-// Fext Upstream Actual Aggregate Transmit Power
-// FEXT upstream actual aggregate transmit power: The FEXT ACTATPus attribute is the total transmit
-// power (see clause 7.5.1.25.1 of [ITUT G.997.1]) calculated from PSDus measured during FEXTC
-// duration at the ATU-C. The attribute value ranges from 0 (-31.0-dBm) to 620 (+31.0-dBm). The
-// special value 0xFFFF indicates that the parameter is out of range. (R) (mandatory) (2-bytes)
-//
-// Next Upstream Actual Aggregate Transmit Power
-// NEXT upstream actual aggregate transmit power: The NEXT ACTATPus attribute is the total transmit
-// power (see clause 7.5.1.25.2 of [ITUT G.997.1]) calculated from PSDus measured during NEXTC
-// duration at the ATU-C. The attribute value ranges from 0 (-31.0-dBm) to 620 (+31.0-dBm). The
-// special value 0xFFFF indicates that the parameter is out of range. (R) (mandatory) (2-bytes)
-//
-type XdslLineInventoryAndStatusDataPart5 struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- xdsllineinventoryandstatusdatapart5BME = &ManagedEntityDefinition{
- Name: "XdslLineInventoryAndStatusDataPart5",
- ClassID: 325,
- MessageTypes: mapset.NewSetWith(
- Get,
- ),
- AllowedAttributeMask: 0xffff,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
- 1: Uint16Field("FextDownstreamSnrMargin", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
- 2: Uint16Field("NextDownstreamSnrMargin", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read), false, false, false, 2),
- 3: Uint16Field("FextUpstreamSnrMargin", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, false, false, 3),
- 4: Uint16Field("NextUpstreamSnrMargin", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, false, false, 4),
- 5: Uint32Field("FextDownstreamMaximumAttainableDataRate", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read), false, false, false, 5),
- 6: Uint32Field("NextDownstreamMaximumAttainableDataRate", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, false, false, 6),
- 7: Uint32Field("FextUpstreamMaximumAttainableDataRate", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, false, false, 7),
- 8: Uint32Field("NextUpstreamMaximumAttainableDataRate", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read), false, false, false, 8),
- 9: Uint16Field("FextDownstreamActualPowerSpectralDensity", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), false, false, false, 9),
- 10: Uint16Field("NextDownstreamActualPowerSpectralDensity", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, false, false, 10),
- 11: Uint16Field("FextUpstreamActualPowerSpectralDensity", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, false, false, 11),
- 12: Uint16Field("NextUpstreamActualPowerSpectralDensity", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read), false, false, false, 12),
- 13: Uint16Field("FextDownstreamActualAggregateTransmitPower", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read), false, false, false, 13),
- 14: Uint16Field("NextDownstreamActualAggregateTransmitPower", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read), false, false, false, 14),
- 15: Uint16Field("FextUpstreamActualAggregateTransmitPower", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read), false, false, false, 15),
- 16: Uint16Field("NextUpstreamActualAggregateTransmitPower", UnsignedIntegerAttributeType, 0x0001, 0, mapset.NewSetWith(Read), false, false, false, 16),
- },
- Access: CreatedByOnu,
- Support: UnknownSupport,
- }
-}
-
-// NewXdslLineInventoryAndStatusDataPart5 (class ID 325) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewXdslLineInventoryAndStatusDataPart5(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*xdsllineinventoryandstatusdatapart5BME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/generated/xdslpsdmaskprofile.go b/vendor/github.com/opencord/omci-lib-go/generated/xdslpsdmaskprofile.go
deleted file mode 100644
index fe12ac1..0000000
--- a/vendor/github.com/opencord/omci-lib-go/generated/xdslpsdmaskprofile.go
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/cboling/OMCI-parser/README.md
- */
-
-package generated
-
-import "github.com/deckarep/golang-set"
-
-// XdslPsdMaskProfileClassID is the 16-bit ID for the OMCI
-// Managed entity xDSL PSD mask profile
-const XdslPsdMaskProfileClassID ClassID = ClassID(110)
-
-var xdslpsdmaskprofileBME *ManagedEntityDefinition
-
-// XdslPsdMaskProfile (class ID #110)
-// This ME contains a PSD mask profile for an xDSL UNI. An instance of this ME is created and
-// deleted by the OLT.
-//
-// Relationships
-// An instance of this ME may be associated with zero or more instances of the PPTP xDSL UNI part
-// 1.
-//
-// Attributes
-// Managed Entity Id
-// Managed entity ID: This attribute uniquely identifies each instance of this ME. The value 0 is
-// reserved. (R, setbycreate) (mandatory) (2-bytes)
-//
-// Psd Mask Table
-// (R,-W) (mandatory) (4 * N bytes where N is the number of breakpoints)
-//
-// Mask Valid
-// (R,-W) (mandatory) (1-byte)
-//
-type XdslPsdMaskProfile struct {
- ManagedEntityDefinition
- Attributes AttributeValueMap
-}
-
-func init() {
- xdslpsdmaskprofileBME = &ManagedEntityDefinition{
- Name: "XdslPsdMaskProfile",
- ClassID: 110,
- MessageTypes: mapset.NewSetWith(
- Create,
- Delete,
- Get,
- GetNext,
- Set,
- SetTable,
- ),
- AllowedAttributeMask: 0xc000,
- AttributeDefinitions: AttributeDefinitionMap{
- 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
- 1: TableField("PsdMaskTable", TableAttributeType, 0x8000, TableInfo{nil, 4}, mapset.NewSetWith(Read, Write), false, false, false, 1),
- 2: ByteField("MaskValid", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
- },
- Access: CreatedByOlt,
- Support: UnknownSupport,
- }
-}
-
-// NewXdslPsdMaskProfile (class ID 110) creates the basic
-// Managed Entity definition that is used to validate an ME of this type that
-// is received from or transmitted to the OMCC.
-func NewXdslPsdMaskProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
- return NewManagedEntity(*xdslpsdmaskprofileBME, params...)
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/layers.go b/vendor/github.com/opencord/omci-lib-go/layers.go
deleted file mode 100644
index 1e0b686..0000000
--- a/vendor/github.com/opencord/omci-lib-go/layers.go
+++ /dev/null
@@ -1,241 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-
-package omci
-
-import (
- "errors"
- "github.com/google/gopacket"
- me "github.com/opencord/omci-lib-go/generated"
-)
-
-var nextLayerMapping map[MessageType]gopacket.LayerType
-
-var (
- // Baseline Message Types
- LayerTypeCreateRequest gopacket.LayerType
- LayerTypeDeleteRequest gopacket.LayerType
- LayerTypeSetRequest gopacket.LayerType
- LayerTypeGetRequest gopacket.LayerType
- LayerTypeGetAllAlarmsRequest gopacket.LayerType
- LayerTypeGetAllAlarmsNextRequest gopacket.LayerType
- LayerTypeMibUploadRequest gopacket.LayerType
- LayerTypeMibUploadNextRequest gopacket.LayerType
- LayerTypeMibResetRequest gopacket.LayerType
- LayerTypeTestRequest gopacket.LayerType
- LayerTypeStartSoftwareDownloadRequest gopacket.LayerType
- LayerTypeDownloadSectionRequest gopacket.LayerType
- LayerTypeDownloadSectionLastRequest gopacket.LayerType
- LayerTypeEndSoftwareDownloadRequest gopacket.LayerType
- LayerTypeActivateSoftwareRequest gopacket.LayerType
- LayerTypeCommitSoftwareRequest gopacket.LayerType
- LayerTypeSynchronizeTimeRequest gopacket.LayerType
- LayerTypeRebootRequest gopacket.LayerType
- LayerTypeGetNextRequest gopacket.LayerType
- LayerTypeGetCurrentDataRequest gopacket.LayerType
- LayerTypeSetTableRequest gopacket.LayerType
-
- // Extended Request Message Types
- LayerTypeGetRequestExtended gopacket.LayerType
- LayerTypeDownloadSectionRequestExtended gopacket.LayerType
- LayerTypeDownloadSectionLastRequestExtended gopacket.LayerType
-)
-var (
- // Baseline Message Types
- LayerTypeCreateResponse gopacket.LayerType
- LayerTypeDeleteResponse gopacket.LayerType
- LayerTypeSetResponse gopacket.LayerType
- LayerTypeGetResponse gopacket.LayerType
- LayerTypeGetAllAlarmsResponse gopacket.LayerType
- LayerTypeGetAllAlarmsNextResponse gopacket.LayerType
- LayerTypeMibUploadResponse gopacket.LayerType
- LayerTypeMibUploadNextResponse gopacket.LayerType
- LayerTypeMibResetResponse gopacket.LayerType
- LayerTypeAlarmNotification gopacket.LayerType
- LayerTypeAttributeValueChange gopacket.LayerType
- LayerTypeTestResponse gopacket.LayerType
- LayerTypeStartSoftwareDownloadResponse gopacket.LayerType
- LayerTypeDownloadSectionResponse gopacket.LayerType
- LayerTypeEndSoftwareDownloadResponse gopacket.LayerType
- LayerTypeActivateSoftwareResponse gopacket.LayerType
- LayerTypeCommitSoftwareResponse gopacket.LayerType
- LayerTypeSynchronizeTimeResponse gopacket.LayerType
- LayerTypeRebootResponse gopacket.LayerType
- LayerTypeGetNextResponse gopacket.LayerType
- LayerTypeTestResult gopacket.LayerType
- LayerTypeGetCurrentDataResponse gopacket.LayerType
- LayerTypeSetTableResponse gopacket.LayerType
-
- // Extended Response/Notification Message Types
- LayerTypeGetResponseExtended gopacket.LayerType
- LayerTypeDownloadSectionResponseExtended gopacket.LayerType
- LayerTypeAlarmNotificationExtended gopacket.LayerType
- LayerTypeAttributeValueChangeExtended gopacket.LayerType
- LayerTypeTestResultExtended gopacket.LayerType
-)
-
-func mkReqLayer(mt me.MsgType, mts string, decode gopacket.DecodeFunc) gopacket.LayerType {
- return gopacket.RegisterLayerType(1000+(int(mt)|int(me.AR)),
- gopacket.LayerTypeMetadata{Name: mts, Decoder: decode})
-}
-
-func mkRespLayer(mt me.MsgType, mts string, decode gopacket.DecodeFunc) gopacket.LayerType {
- return gopacket.RegisterLayerType(1000+(int(mt)|int(me.AK)),
- gopacket.LayerTypeMetadata{Name: mts, Decoder: decode})
-}
-
-func mkLayer(mt me.MsgType, mts string, decode gopacket.DecodeFunc) gopacket.LayerType {
- return gopacket.RegisterLayerType(1000+(int(mt)),
- gopacket.LayerTypeMetadata{Name: mts, Decoder: decode})
-}
-
-func init() {
- // Create layers for message_type & action
- LayerTypeCreateRequest = mkReqLayer(me.Create, "CreateRequest", gopacket.DecodeFunc(decodeCreateRequest))
- LayerTypeDeleteRequest = mkReqLayer(me.Delete, "DeleteRequest", gopacket.DecodeFunc(decodeDeleteRequest))
- LayerTypeSetRequest = mkReqLayer(me.Set, "SetRequest", gopacket.DecodeFunc(decodeSetRequest))
- LayerTypeGetRequest = mkReqLayer(me.Get, "GetRequest", gopacket.DecodeFunc(decodeGetRequest))
- LayerTypeGetAllAlarmsRequest = mkReqLayer(me.GetAllAlarms, "GetAllAlarmsRequest", gopacket.DecodeFunc(decodeGetAllAlarmsRequest))
- LayerTypeGetAllAlarmsNextRequest = mkReqLayer(me.GetAllAlarmsNext, "GetAllAlarmsNextRequest", gopacket.DecodeFunc(decodeGetAllAlarmsNextRequest))
- LayerTypeMibUploadRequest = mkReqLayer(me.MibUpload, "MibUploadRequest", gopacket.DecodeFunc(decodeMibUploadRequest))
- LayerTypeMibUploadNextRequest = mkReqLayer(me.MibUploadNext, "MibUploadNextRequest", gopacket.DecodeFunc(decodeMibUploadNextRequest))
- LayerTypeMibResetRequest = mkReqLayer(me.MibReset, "MibResetRequest", gopacket.DecodeFunc(decodeMibResetRequest))
- LayerTypeTestRequest = mkReqLayer(me.Test, "TestRequest", gopacket.DecodeFunc(decodeTestRequest))
- LayerTypeStartSoftwareDownloadRequest = mkReqLayer(me.StartSoftwareDownload, "StartSoftwareDownloadRequest", gopacket.DecodeFunc(decodeStartSoftwareDownloadRequest))
-
- // For Download section, AR=0 if not response expected, AR=1 if response expected (last section of a window)
- LayerTypeDownloadSectionRequest = mkLayer(me.DownloadSection, "DownloadSectionRequest", gopacket.DecodeFunc(decodeDownloadSectionRequest))
- LayerTypeDownloadSectionLastRequest = mkReqLayer(me.DownloadSection, "DownloadLastSectionRequest", gopacket.DecodeFunc(decodeDownloadSectionRequest))
- LayerTypeEndSoftwareDownloadRequest = mkReqLayer(me.EndSoftwareDownload, "EndSoftwareDownloadRequest", gopacket.DecodeFunc(decodeEndSoftwareDownloadRequest))
- LayerTypeActivateSoftwareRequest = mkReqLayer(me.ActivateSoftware, "ActivateSoftwareRequest", gopacket.DecodeFunc(decodeActivateSoftwareRequest))
- LayerTypeCommitSoftwareRequest = mkReqLayer(me.CommitSoftware, "CommitSoftwareRequest", gopacket.DecodeFunc(decodeCommitSoftwareRequest))
- LayerTypeSynchronizeTimeRequest = mkReqLayer(me.SynchronizeTime, "SynchronizeTimeRequest", gopacket.DecodeFunc(decodeSynchronizeTimeRequest))
- LayerTypeRebootRequest = mkReqLayer(me.Reboot, "RebootRequest", gopacket.DecodeFunc(decodeRebootRequest))
- LayerTypeGetNextRequest = mkReqLayer(me.GetNext, "GetNextRequest", gopacket.DecodeFunc(decodeGetNextRequest))
- LayerTypeGetCurrentDataRequest = mkReqLayer(me.GetCurrentData, "GetCurrentDataRequest", gopacket.DecodeFunc(decodeGetCurrentDataRequest))
- LayerTypeSetTableRequest = mkReqLayer(me.SetTable, "SetTableRequest", gopacket.DecodeFunc(decodeSetTableRequest))
-
- LayerTypeCreateResponse = mkRespLayer(me.Create, "CreateResponse", gopacket.DecodeFunc(decodeCreateResponse))
- LayerTypeDeleteResponse = mkRespLayer(me.Delete, "DeleteResponse", gopacket.DecodeFunc(decodeDeleteResponse))
- LayerTypeSetResponse = mkRespLayer(me.Set, "SetResponse", gopacket.DecodeFunc(decodeSetResponse))
- LayerTypeGetResponse = mkRespLayer(me.Get, "GetResponse", gopacket.DecodeFunc(decodeGetResponse))
- LayerTypeGetAllAlarmsResponse = mkRespLayer(me.GetAllAlarms, "GetAllAlarmsResponse", gopacket.DecodeFunc(decodeGetAllAlarmsResponse))
- LayerTypeGetAllAlarmsNextResponse = mkRespLayer(me.GetAllAlarmsNext, "GetAllAlarmsNextResponse", gopacket.DecodeFunc(decodeGetAllAlarmsNextResponse))
- LayerTypeMibUploadResponse = mkRespLayer(me.MibUpload, "MibUploadResponse", gopacket.DecodeFunc(decodeMibUploadResponse))
- LayerTypeMibUploadNextResponse = mkRespLayer(me.MibUploadNext, "MibUploadNextResponse", gopacket.DecodeFunc(decodeMibUploadNextResponse))
- LayerTypeMibResetResponse = mkRespLayer(me.MibReset, "MibResetResponse", gopacket.DecodeFunc(decodeMibResetResponse))
- LayerTypeAlarmNotification = mkLayer(me.AlarmNotification, "AlarmNotification", gopacket.DecodeFunc(decodeAlarmNotification))
- LayerTypeAttributeValueChange = mkLayer(me.AttributeValueChange, "AttributeValueChange", gopacket.DecodeFunc(decodeAttributeValueChange))
- LayerTypeTestResponse = mkRespLayer(me.Test, "TestResponse", gopacket.DecodeFunc(decodeTestResponse))
- LayerTypeStartSoftwareDownloadResponse = mkRespLayer(me.StartSoftwareDownload, "StartSoftwareDownloadResponse", gopacket.DecodeFunc(decodeStartSoftwareDownloadResponse))
- LayerTypeDownloadSectionResponse = mkRespLayer(me.DownloadSection, "DownloadSectionResponse", gopacket.DecodeFunc(decodeDownloadSectionResponse))
- LayerTypeEndSoftwareDownloadResponse = mkRespLayer(me.EndSoftwareDownload, "EndSoftwareDownloadResponse", gopacket.DecodeFunc(decodeEndSoftwareDownloadResponse))
- LayerTypeActivateSoftwareResponse = mkRespLayer(me.ActivateSoftware, "ActivateSoftwareResponse", gopacket.DecodeFunc(decodeActivateSoftwareResponse))
- LayerTypeCommitSoftwareResponse = mkRespLayer(me.CommitSoftware, "CommitSoftwareResponse", gopacket.DecodeFunc(decodeCommitSoftwareResponse))
- LayerTypeSynchronizeTimeResponse = mkRespLayer(me.SynchronizeTime, "SynchronizeTimeResponse", gopacket.DecodeFunc(decodeSynchronizeTimeResponse))
- LayerTypeRebootResponse = mkRespLayer(me.Reboot, "RebootResponse", gopacket.DecodeFunc(decodeRebootResponse))
- LayerTypeGetNextResponse = mkRespLayer(me.GetNext, "GetNextResponse", gopacket.DecodeFunc(decodeGetNextResponse))
- LayerTypeTestResult = mkRespLayer(me.TestResult, "TestResult", gopacket.DecodeFunc(decodeTestResult))
- LayerTypeGetCurrentDataResponse = mkRespLayer(me.GetCurrentData, "GetCurrentDataResponse", gopacket.DecodeFunc(decodeGetCurrentDataResponse))
- LayerTypeSetTableResponse = mkRespLayer(me.SetTable, "SetTableResponse", gopacket.DecodeFunc(decodeSetTableResponse))
-
- // Extended message set support
-
- LayerTypeGetRequestExtended = mkReqLayer(me.Get|me.ExtendedOffset, "GetRequest-Ext", gopacket.DecodeFunc(decodeGetRequestExtended))
- LayerTypeGetResponseExtended = mkRespLayer(me.Get|me.ExtendedOffset, "GetResponse-Ext", gopacket.DecodeFunc(decodeGetResponseExtended))
- LayerTypeDownloadSectionRequestExtended = mkLayer(me.DownloadSection|me.ExtendedOffset, "DownloadSectionRequest-Ext", gopacket.DecodeFunc(decodeDownloadSectionRequestExtended))
- LayerTypeDownloadSectionLastRequestExtended = mkReqLayer(me.DownloadSection|me.ExtendedOffset, "DownloadLastSectionRequest-Ext", gopacket.DecodeFunc(decodeDownloadSectionRequestExtended))
- LayerTypeDownloadSectionResponseExtended = mkRespLayer(me.DownloadSection|me.ExtendedOffset, "DownloadSectionResponse-Ext", gopacket.DecodeFunc(decodeDownloadSectionResponseExtended))
-
- LayerTypeAlarmNotificationExtended = mkLayer(me.AlarmNotification|me.ExtendedOffset, "AlarmNotification-Ext", gopacket.DecodeFunc(decodeAlarmNotificationExtended))
- LayerTypeAttributeValueChangeExtended = mkLayer(me.AttributeValueChange|me.ExtendedOffset, "AttributeValueChange-Ext", gopacket.DecodeFunc(decodeAttributeValueChangeExtended))
- LayerTypeTestResultExtended = mkLayer(me.TestResult|me.ExtendedOffset, "TestResult-Ext", gopacket.DecodeFunc(decodeTestResultExtended))
-
- // Map message_type and action to layer
- nextLayerMapping = make(map[MessageType]gopacket.LayerType)
-
- nextLayerMapping[CreateRequestType] = LayerTypeCreateRequest
- nextLayerMapping[DeleteRequestType] = LayerTypeDeleteRequest
- nextLayerMapping[SetRequestType] = LayerTypeSetRequest
- nextLayerMapping[GetRequestType] = LayerTypeGetRequest
- nextLayerMapping[GetAllAlarmsRequestType] = LayerTypeGetAllAlarmsRequest
- nextLayerMapping[GetAllAlarmsNextRequestType] = LayerTypeGetAllAlarmsNextRequest
- nextLayerMapping[MibUploadRequestType] = LayerTypeMibUploadRequest
- nextLayerMapping[MibUploadNextRequestType] = LayerTypeMibUploadNextRequest
- nextLayerMapping[MibResetRequestType] = LayerTypeMibResetRequest
- nextLayerMapping[TestRequestType] = LayerTypeTestRequest
- nextLayerMapping[StartSoftwareDownloadRequestType] = LayerTypeStartSoftwareDownloadRequest
- nextLayerMapping[DownloadSectionRequestType] = LayerTypeDownloadSectionRequest
- nextLayerMapping[DownloadSectionRequestWithResponseType] = LayerTypeDownloadSectionRequest
- nextLayerMapping[EndSoftwareDownloadRequestType] = LayerTypeEndSoftwareDownloadRequest
- nextLayerMapping[ActivateSoftwareRequestType] = LayerTypeActivateSoftwareRequest
- nextLayerMapping[CommitSoftwareRequestType] = LayerTypeCommitSoftwareRequest
- nextLayerMapping[SynchronizeTimeRequestType] = LayerTypeSynchronizeTimeRequest
- nextLayerMapping[RebootRequestType] = LayerTypeRebootRequest
- nextLayerMapping[GetNextRequestType] = LayerTypeGetNextRequest
- nextLayerMapping[GetCurrentDataRequestType] = LayerTypeGetCurrentDataRequest
- nextLayerMapping[SetTableRequestType] = LayerTypeSetTableRequest
-
- nextLayerMapping[CreateResponseType] = LayerTypeCreateResponse
- nextLayerMapping[DeleteResponseType] = LayerTypeDeleteResponse
- nextLayerMapping[SetResponseType] = LayerTypeSetResponse
- nextLayerMapping[GetResponseType] = LayerTypeGetResponse
- nextLayerMapping[GetAllAlarmsResponseType] = LayerTypeGetAllAlarmsResponse
- nextLayerMapping[GetAllAlarmsNextResponseType] = LayerTypeGetAllAlarmsNextResponse
- nextLayerMapping[MibUploadResponseType] = LayerTypeMibUploadResponse
- nextLayerMapping[MibUploadNextResponseType] = LayerTypeMibUploadNextResponse
- nextLayerMapping[MibResetResponseType] = LayerTypeMibResetResponse
- nextLayerMapping[TestResponseType] = LayerTypeTestResponse
- nextLayerMapping[StartSoftwareDownloadResponseType] = LayerTypeStartSoftwareDownloadResponse
- nextLayerMapping[DownloadSectionResponseType] = LayerTypeDownloadSectionResponse
- nextLayerMapping[EndSoftwareDownloadResponseType] = LayerTypeEndSoftwareDownloadResponse
- nextLayerMapping[ActivateSoftwareResponseType] = LayerTypeActivateSoftwareResponse
- nextLayerMapping[CommitSoftwareResponseType] = LayerTypeCommitSoftwareResponse
- nextLayerMapping[SynchronizeTimeResponseType] = LayerTypeSynchronizeTimeResponse
- nextLayerMapping[RebootResponseType] = LayerTypeRebootResponse
- nextLayerMapping[GetNextResponseType] = LayerTypeGetNextResponse
- nextLayerMapping[GetCurrentDataResponseType] = LayerTypeGetCurrentDataResponse
- nextLayerMapping[SetTableResponseType] = LayerTypeSetTableResponse
-
- nextLayerMapping[AttributeValueChangeType] = LayerTypeAttributeValueChange
- nextLayerMapping[AlarmNotificationType] = LayerTypeAlarmNotification
- nextLayerMapping[TestResultType] = LayerTypeTestResult
-
- // Extended message support
- nextLayerMapping[GetRequestType+ExtendedTypeDecodeOffset] = LayerTypeGetRequestExtended
- nextLayerMapping[GetResponseType+ExtendedTypeDecodeOffset] = LayerTypeGetResponseExtended
-
- // For Download section, AR=0 if not response expected, AR=1 if response expected (last section of a window)
- nextLayerMapping[DownloadSectionRequestType+ExtendedTypeDecodeOffset] = LayerTypeDownloadSectionRequestExtended
- nextLayerMapping[DownloadSectionRequestWithResponseType+ExtendedTypeDecodeOffset] = LayerTypeDownloadSectionLastRequestExtended
- nextLayerMapping[DownloadSectionResponseType+ExtendedTypeDecodeOffset] = LayerTypeDownloadSectionResponseExtended
-
- nextLayerMapping[AlarmNotificationType+ExtendedTypeDecodeOffset] = LayerTypeAlarmNotificationExtended
- nextLayerMapping[AttributeValueChangeType+ExtendedTypeDecodeOffset] = LayerTypeAttributeValueChangeExtended
- nextLayerMapping[TestResultType+ExtendedTypeDecodeOffset] = LayerTypeTestResultExtended
-}
-
-func MsgTypeToNextLayer(mt MessageType, isExtended bool) (gopacket.LayerType, error) {
- if isExtended {
- mt |= ExtendedTypeDecodeOffset
- }
- nextLayer, ok := nextLayerMapping[mt]
- if ok {
- return nextLayer, nil
- }
- return gopacket.LayerTypeZero, errors.New("unknown/unsupported message type")
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/meframe.go b/vendor/github.com/opencord/omci-lib-go/meframe.go
deleted file mode 100644
index 472db31..0000000
--- a/vendor/github.com/opencord/omci-lib-go/meframe.go
+++ /dev/null
@@ -1,1536 +0,0 @@
-/*
- * 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.
- */
-/*
- * NOTE: This file was generated, manual edits will be overwritten!
- *
- * Generated by 'goCodeGenerator.py':
- * https://github.com/opencord/omci-lib-go/OMCI-parser/README.md
- */
-
-package omci
-
-import (
- "errors"
- "fmt"
- "github.com/deckarep/golang-set"
- "github.com/google/gopacket"
- me "github.com/opencord/omci-lib-go/generated"
- "time"
-)
-
-var encoderMap map[MessageType]func(*me.ManagedEntity, options) (gopacket.SerializableLayer, error)
-
-func init() {
- encoderMap = make(map[MessageType]func(*me.ManagedEntity, options) (gopacket.SerializableLayer, error))
-
- encoderMap[CreateRequestType] = CreateRequestFrame
- encoderMap[DeleteRequestType] = DeleteRequestFrame
- encoderMap[SetRequestType] = SetRequestFrame
- encoderMap[GetRequestType] = GetRequestFrame
- encoderMap[GetAllAlarmsRequestType] = GetAllAlarmsRequestFrame
- encoderMap[GetAllAlarmsNextRequestType] = GetAllAlarmsNextRequestFrame
- encoderMap[MibUploadRequestType] = MibUploadRequestFrame
- encoderMap[MibUploadNextRequestType] = MibUploadNextRequestFrame
- encoderMap[MibResetRequestType] = MibResetRequestFrame
- //encoderMap[TestRequestType] = TestRequestFrame
- encoderMap[StartSoftwareDownloadRequestType] = StartSoftwareDownloadRequestFrame
- encoderMap[DownloadSectionRequestType] = DownloadSectionRequestFrame
- encoderMap[EndSoftwareDownloadRequestType] = EndSoftwareDownloadRequestFrame
- encoderMap[ActivateSoftwareRequestType] = ActivateSoftwareRequestFrame
- encoderMap[CommitSoftwareRequestType] = CommitSoftwareRequestFrame
- encoderMap[SynchronizeTimeRequestType] = SynchronizeTimeRequestFrame
- encoderMap[RebootRequestType] = RebootRequestFrame
- encoderMap[GetNextRequestType] = GetNextRequestFrame
- encoderMap[GetCurrentDataRequestType] = GetCurrentDataRequestFrame
- encoderMap[SetTableRequestType] = SetTableRequestFrame
- encoderMap[CreateResponseType] = CreateResponseFrame
- encoderMap[DeleteResponseType] = DeleteResponseFrame
- encoderMap[SetResponseType] = SetResponseFrame
- encoderMap[GetResponseType] = GetResponseFrame
- encoderMap[GetAllAlarmsResponseType] = GetAllAlarmsResponseFrame
- encoderMap[GetAllAlarmsNextResponseType] = GetAllAlarmsNextResponseFrame
- encoderMap[MibUploadResponseType] = MibUploadResponseFrame
- encoderMap[MibUploadNextResponseType] = MibUploadNextResponseFrame
- encoderMap[MibResetResponseType] = MibResetResponseFrame
- //encoderMap[TestResponseType] = TestResponseFrame
- encoderMap[StartSoftwareDownloadResponseType] = StartSoftwareDownloadResponseFrame
- encoderMap[DownloadSectionResponseType] = DownloadSectionResponseFrame
- encoderMap[EndSoftwareDownloadResponseType] = EndSoftwareDownloadResponseFrame
- encoderMap[ActivateSoftwareResponseType] = ActivateSoftwareResponseFrame
- encoderMap[CommitSoftwareResponseType] = CommitSoftwareResponseFrame
- encoderMap[SynchronizeTimeResponseType] = SynchronizeTimeResponseFrame
- encoderMap[RebootResponseType] = RebootResponseFrame
- encoderMap[GetNextResponseType] = GetNextResponseFrame
- encoderMap[GetCurrentDataResponseType] = GetCurrentDataResponseFrame
- encoderMap[SetTableResponseType] = SetTableResponseFrame
- encoderMap[AlarmNotificationType] = AlarmNotificationFrame
- encoderMap[AttributeValueChangeType] = AttributeValueChangeFrame
- //encoderMap[TestResultType] = TestResultFrame
-}
-
-type options struct {
- frameFormat DeviceIdent
- failIfTruncated bool
- attributeMask uint16
- result me.Results // Common for many responses
- attrExecutionMask uint16 // Create Response Only if results == 3 or Set Response only if results == 0
- unsupportedMask uint16 // Set Response only if results == 9
- sequenceNumberCountOrSize uint16 // For get-next request frames and for frames that return number of commands or length
- transactionID uint16 // OMCI TID
- mode uint8 // Get All Alarms retrieval mode
- alarm AlarmOptions // Alarm related frames
- software SoftwareOptions // Software image related frames
- payload interface{} // ME or list of MEs, alarm bitmap, timestamp, ...
- addDefaults bool // Add missing SetByCreate attributes for Create Requests
-}
-
-var defaultFrameOptions = options{
- frameFormat: BaselineIdent,
- failIfTruncated: false,
- attributeMask: 0xFFFF,
- result: me.Success,
- attrExecutionMask: 0,
- unsupportedMask: 0,
- sequenceNumberCountOrSize: 0,
- transactionID: 0,
- mode: 0,
- software: defaultSoftwareOptions,
- alarm: defaultAlarmOptions,
- payload: nil,
- addDefaults: false,
-}
-
-// FrameOption sets options such as frame format, etc.
-type FrameOption func(*options)
-
-// FrameFormat determines determines the OMCI message format used on the fiber.
-// The default value is BaselineIdent
-func FrameFormat(ff DeviceIdent) FrameOption {
- return func(o *options) {
- o.frameFormat = ff
- }
-}
-
-// FailIfTruncated determines whether a request to encode a frame that does
-// not have enough room for all requested options should fail and return an
-// error.
-//
-// If set to 'false', the behaviour depends on the message type/operation
-// requested. The table below provides more information:
-//
-// Request Type Behavour
-// ------------------------------------------------------------------------
-// CreateRequest A single CreateRequest struct is always returned as the
-// CreateRequest message does not have an attributes Mask
-// field and a Baseline OMCI message is large enough to
-// support all Set-By-Create attributes.
-//
-// GetResponse If multiple OMCI response frames are needed to return
-// all requested attributes, only the attributes that can
-// fit will be returned and the FailedAttributeMask field
-// set to the attributes that could not be returned
-//
-// If this is an ME with an attribute that is a table, the
-// first GetResponse struct will return the size of the
-// attribute and the following GetNextResponse structs will
-// contain the attribute data. The ONU application is
-// responsible for stashing these extra struct(s) away in
-// anticipation of possible GetNext Requests occurring for
-// the attribute. See the discussion on Table attributes
-// in the GetResponse section of ITU G.988 for more
-// information.
-//
-// If set to 'true', no struct(s) are returned and an error is provided.
-//
-// The default value is 'false'
-func FailIfTruncated(f bool) FrameOption {
- return func(o *options) {
- o.failIfTruncated = f
- }
-}
-
-// attributeMask determines the attributes to encode into the frame.
-// The default value is 0xFFFF which specifies all available attributes
-// in the frame
-func AttributeMask(m uint16) FrameOption {
- return func(o *options) {
- o.attributeMask = m
- }
-}
-
-// AttributeExecutionMask is used by the Create and Set Response frames to indicate
-// attributes that failed to be created/set.
-func AttributeExecutionMask(m uint16) FrameOption {
- return func(o *options) {
- o.attrExecutionMask = m
- }
-}
-
-// UnsupportedAttributeMask is used by the Set Response frames to indicate
-// attributes are not supported on this ONU
-func UnsupportedAttributeMask(m uint16) FrameOption {
- return func(o *options) {
- o.unsupportedMask = m
- }
-}
-
-// Result is used to set returned results in responses
-// that have that field
-func Result(r me.Results) FrameOption {
- return func(o *options) {
- o.result = r
- }
-}
-
-// SequenceNumberCountOrSize is used by the GetNext and MibUploadGetNext request frames and for
-// frames that return number of commands or length such as Get (table attribute) or
-// MibUpload/GetAllAlarms/...
-func SequenceNumberCountOrSize(m uint16) FrameOption {
- return func(o *options) {
- o.sequenceNumberCountOrSize = m
- }
-}
-
-// TransactionID is to specify the TID in the OMCI header. The default is
-// zero which requires the caller to set it to the appropriate value if this
-// is not an autonomous ONU notification frame
-func TransactionID(tid uint16) FrameOption {
- return func(o *options) {
- o.transactionID = tid
- }
-}
-
-// RetrievalMode is to specify the the Alarm Retrieval Mode in a GetAllAlarms Request
-func RetrievalMode(m uint8) FrameOption {
- return func(o *options) {
- o.mode = m
- }
-}
-
-// SuccessResult is to specify the the SuccessResult for a SynchronizeTime Response
-func SuccessResult(m uint8) FrameOption {
- return func(o *options) {
- o.mode = m
- }
-}
-
-// RebootCondition is to specify the the Reboot Condition for a ONU Reboot request
-func RebootCondition(m uint8) FrameOption {
- return func(o *options) {
- o.mode = m
- }
-}
-
-// Alarm is used to specify a collection of options related to Alarm notifications
-func Alarm(ao AlarmOptions) FrameOption {
- return func(o *options) {
- o.alarm = ao
- }
-}
-
-// Software is used to specify a collection of options related to Software image
-// manipulation
-func Software(so SoftwareOptions) FrameOption {
- return func(o *options) {
- o.software = so
- }
-}
-
-// Payload is used to specify ME payload options that are not simple types. This
-// include the ME (list of MEs) to encode into a GetNextMibUpload response, the
-// alarm bitmap for alarm relates responses/notifications, alarm bitmaps, and
-// for specifying the download section data when performing Software Download.
-func Payload(p interface{}) FrameOption {
- return func(o *options) {
- o.payload = p
- }
-}
-
-// AddDefaults is used to specify that if a SetByCreate attribute is not
-// specified in the list of attributes for a Create Request, use the attribute
-// defined default
-func AddDefaults(add bool) FrameOption {
- return func(o *options) {
- o.addDefaults = add
- }
-}
-
-// Alarm related frames have a wide variety of settable values. Placing them
-// in a separate struct is mainly to keep the base options simple
-type AlarmOptions struct {
- AlarmClassID me.ClassID
- AlarmInstance uint16
- AlarmBitmap []byte // Should be up to 58 octets
-}
-
-var defaultAlarmOptions = AlarmOptions{
- AlarmClassID: 0,
- AlarmInstance: 0,
- AlarmBitmap: nil,
-}
-
-// Software related frames have a wide variety of settable values. Placing them
-// in a separate struct is mainly to keep the base options simple
-type SoftwareOptions struct {
- WindowSize uint8 // Window size - 1
- SectionNumber uint8 // [0..Window size - 1]
- ImageSize uint32
- CircuitPacks []uint16 // slot (upper 8 bits) and instance (lower 8 bits)
- Results []DownloadResults
- Data []byte
-}
-
-var defaultSoftwareOptions = SoftwareOptions{
- WindowSize: 0,
- SectionNumber: 0,
- ImageSize: 0,
- CircuitPacks: nil,
- Results: nil,
- Data: nil,
-}
-
-// EncodeFrame will encode the Managed Entity specific protocol struct and an
-// OMCILayer struct. This struct can be provided to the gopacket.SerializeLayers()
-// function to be serialized into a buffer for transmission.
-func EncodeFrame(m *me.ManagedEntity, messageType MessageType, opt ...FrameOption) (*OMCI, gopacket.SerializableLayer, error) {
- // Check for message type support
- msgType := me.MsgType(messageType & me.MsgTypeMask)
- meDefinition := m.GetManagedEntityDefinition()
-
- if !me.SupportsMsgType(meDefinition, msgType) {
- msg := fmt.Sprintf("managed entity %v does not support %v Message-Type",
- meDefinition.GetName(), msgType)
- return nil, nil, errors.New(msg)
- }
- // Decode options
- opts := defaultFrameOptions
- for _, o := range opt {
- o(&opts)
- }
- // TODO: If AttributesMask option passed in, check for deprecated options. Allow encoding option
- // that will ignore deprecated option. Add additional in the get and set meframe_test,go
- // test functions to test this. Also have it test attribute name(s) to see if the attribute
- // is deprecated. The OMCI-Parser now supports detection of deprecated attributes and
- // provides that to the code-generator (and currently available in generated golang code).
- // Note: Transaction ID should be set before frame serialization
- omci := &OMCI{
- TransactionID: opts.transactionID,
- MessageType: messageType,
- DeviceIdentifier: opts.frameFormat,
- }
- var meInfo gopacket.SerializableLayer
- var err error
-
- if encoder, ok := encoderMap[messageType]; ok {
- meInfo, err = encoder(m, opts)
- } else {
- err = fmt.Errorf("message-type: %v/%#x is not supported", messageType, messageType)
- }
- if err != nil {
- return nil, nil, err
- }
- return omci, meInfo, err
-}
-
-// For most all create methods below, error checking for valid masks, attribute
-// values, and other fields is left to when the frame is actually serialized.
-
-func checkAttributeMask(m *me.ManagedEntity, mask uint16) (uint16, error) {
- if mask == defaultFrameOptions.attributeMask {
- // Scale back to just what is allowed
- return m.GetAllowedAttributeMask(), nil
- }
- if mask&m.GetManagedEntityDefinition().GetAllowedAttributeMask() != mask {
- return 0, errors.New("invalid attribute mask")
- }
- return mask & m.GetManagedEntityDefinition().GetAllowedAttributeMask(), nil
-}
-
-// return the maximum space that can be used by attributes
-func maxPacketAvailable(m *me.ManagedEntity, opt options) uint {
- if opt.frameFormat == BaselineIdent {
- // OMCI Header - 4 octets
- // Class ID/Instance ID - 4 octets
- // Length field - 4 octets
- // MIC - 4 octets
- return MaxBaselineLength - 16
- }
- // OMCI Header - 4 octets
- // Class ID/Instance ID - 4 octets
- // Length field - 2 octets
- // MIC - 4 octets
- return MaxExtendedLength - 14
-}
-
-func calculateAttributeMask(m *me.ManagedEntity, requestedMask uint16) (uint16, error) {
- attrDefs := m.GetAttributeDefinitions()
- var entityIDName string
- if entry, ok := attrDefs[0]; ok {
- entityIDName = entry.GetName()
- } else {
- panic("unexpected error") // All attribute definition maps have an entity ID
- }
- attributeNames := make([]interface{}, 0)
- for attrName := range m.GetAttributeValueMap() {
- if attrName == entityIDName {
- continue // No mask for EntityID
- }
- attributeNames = append(attributeNames, attrName)
- }
- calculatedMask, err := me.GetAttributesBitmap(attrDefs, mapset.NewSetWith(attributeNames...))
-
- if err != nil {
- return 0, err
- }
- return calculatedMask & requestedMask, nil
-}
-
-// GenFrame is a helper function to make tests a little easier to read.
-// For a real application, use the .../omci/generated/class.go 'New'
-// functions to create your Managed Entity and then use it to call the
-// EncodeFrame method.
-func GenFrame(meInstance *me.ManagedEntity, messageType MessageType, options ...FrameOption) ([]byte, error) {
- omciLayer, msgLayer, err := EncodeFrame(meInstance, messageType, options...)
- if err != nil {
- return nil, err
- }
- // Serialize the frame and send it
- var serializeOptions gopacket.SerializeOptions
- serializeOptions.FixLengths = true
-
- buffer := gopacket.NewSerializeBuffer()
- err = gopacket.SerializeLayers(buffer, serializeOptions, omciLayer, msgLayer)
- if err != nil {
- return nil, err
- }
- return buffer.Bytes(), nil
-}
-
-func CreateRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- // NOTE: The OMCI parser does not extract the default values of set-by-create attributes
- // and are the zero 'default' (or nil) at this time. For this reason, make sure
- // you specify all non-zero default values and pass them in appropriate
- meLayer := &CreateRequest{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- Attributes: m.GetAttributeValueMap(),
- }
- // Add any missing SetByCreate options if requested
- if opt.addDefaults {
- if attrDefs, err := me.GetAttributesDefinitions(m.GetClassID()); err.StatusCode() == me.Success {
- for index, attr := range attrDefs {
- if me.SupportsAttributeAccess(attr, me.SetByCreate) {
- if index == 0 {
- continue // Skip Entity ID, if it is SetByCreate, they should always specify it
- }
- if _, found := meLayer.Attributes[attr.GetName()]; !found {
- meLayer.Attributes[attr.GetName()] = attr.DefValue
- }
- }
- }
- }
- }
- return meLayer, nil
-}
-
-func CreateResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- meLayer := &CreateResponse{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- Result: opt.result,
- }
- if meLayer.Result == me.ParameterError {
- meLayer.AttributeExecutionMask = opt.attrExecutionMask
- }
- return meLayer, nil
-}
-
-func DeleteRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- meLayer := &DeleteRequest{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- }
- return meLayer, nil
-}
-
-func DeleteResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- meLayer := &DeleteResponse{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- Result: opt.result,
- }
- return meLayer, nil
-}
-
-func SetRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- mask, err := checkAttributeMask(m, opt.attributeMask)
- if err != nil {
- return nil, err
- }
- mask, err = calculateAttributeMask(m, mask)
- if err != nil {
- return nil, err
- }
- meDefinition := m.GetManagedEntityDefinition()
- attrDefs := meDefinition.GetAttributeDefinitions()
- attrMap := m.GetAttributeValueMap()
-
- // Get payload space available
- maxPayload := maxPacketAvailable(m, opt)
- payloadAvailable := int(maxPayload) - 2 // Less attribute mask
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- // payloadAvailable -= 2 // Less length
- }
- meLayer := &SetRequest{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- AttributeMask: 0,
- Attributes: make(me.AttributeValueMap),
- }
- for mask != 0 {
- // Iterate down the attributes (Attribute 0 is the ManagedEntity ID)
- var attrIndex uint
- for attrIndex = 1; attrIndex <= 16; attrIndex++ {
- // Is this attribute requested
- if mask&(1<<(16-attrIndex)) != 0 {
- // Get definitions since we need the name
- attrDef, ok := attrDefs[attrIndex]
- if !ok {
- msg := fmt.Sprintf("Unexpected error, index %v not valued for ME %v",
- attrIndex, meDefinition.GetName())
- return nil, errors.New(msg)
- }
- var attrValue interface{}
- attrValue, ok = attrMap[attrDef.Name]
- if !ok {
- msg := fmt.Sprintf("Unexpected error, attribute %v not provided in ME %v: %v",
- attrDef.GetName(), meDefinition.GetName(), m)
- return nil, errors.New(msg)
- }
- // Is space available?
- if attrDef.Size <= payloadAvailable {
- // Mark bit handled
- mask &= ^attrDef.Mask
- meLayer.AttributeMask |= attrDef.Mask
- meLayer.Attributes[attrDef.Name] = attrValue
- payloadAvailable -= attrDef.Size
- } else {
- // TODO: Should we set truncate?
- msg := fmt.Sprintf("out-of-space. Cannot fit attribute %v into SetRequest message",
- attrDef.GetName())
- return nil, me.NewMessageTruncatedError(msg)
- }
- }
- }
- }
- if err == nil && meLayer.AttributeMask == 0 {
- // TODO: Is a set request with no attributes valid?
- return nil, errors.New("no attributes encoded for SetRequest")
- }
- return meLayer, nil
-}
-
-func SetResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- meLayer := &SetResponse{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- Result: opt.result,
- }
- if meLayer.Result == me.AttributeFailure {
- meLayer.UnsupportedAttributeMask = opt.unsupportedMask
- meLayer.FailedAttributeMask = opt.attrExecutionMask
- }
- return meLayer, nil
-}
-
-func GetRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- // Given mask sent in (could be default of 0xFFFF) get what is allowable.
- // This will be all allowed if 0xFFFF is passed in, or a subset if a fixed
- // number of items.
- maxMask, err := checkAttributeMask(m, opt.attributeMask)
- if err != nil {
- return nil, err
- }
- // Now scan attributes and reduce mask to only those requested
- var mask uint16
- mask, err = calculateAttributeMask(m, maxMask)
- if err != nil {
- return nil, err
- }
- if mask == 0 {
- // TODO: Is a Get request with no attributes valid?
- return nil, errors.New("no attributes requested for GetRequest")
- }
- meLayer := &GetRequest{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- AttributeMask: mask,
- }
- return meLayer, nil
-}
-
-func GetResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- mask, err := checkAttributeMask(m, opt.attributeMask)
- if err != nil {
- return nil, err
- }
- mask, err = calculateAttributeMask(m, mask)
- if err != nil {
- return nil, err
- }
- meLayer := &GetResponse{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- Result: opt.result,
- AttributeMask: 0,
- Attributes: make(me.AttributeValueMap),
- }
- if meLayer.Result == me.AttributeFailure {
- meLayer.UnsupportedAttributeMask = opt.unsupportedMask
- meLayer.FailedAttributeMask = opt.attrExecutionMask
- }
- // Encode whatever we can
- if meLayer.Result == me.Success || meLayer.Result == me.AttributeFailure {
- // Encode results
- // Get payload space available
- maxPayload := maxPacketAvailable(m, opt)
- payloadAvailable := int(maxPayload) - 2 - 4 // Less attribute mask and attribute error encoding
- meDefinition := m.GetManagedEntityDefinition()
- attrDefs := meDefinition.GetAttributeDefinitions()
- attrMap := m.GetAttributeValueMap()
-
- if mask != 0 {
- // Iterate down the attributes (Attribute 0 is the ManagedEntity ID)
- var attrIndex uint
- for attrIndex = 1; attrIndex <= 16; attrIndex++ {
- // Is this attribute requested
- if mask&(1<<(16-attrIndex)) != 0 {
- // Get definitions since we need the name
- attrDef, ok := attrDefs[attrIndex]
- if !ok {
- msg := fmt.Sprintf("Unexpected error, index %v not valued for ME %v",
- attrIndex, meDefinition.GetName())
- return nil, errors.New(msg)
- }
- var attrValue interface{}
- attrValue, ok = attrMap[attrDef.Name]
- if !ok {
- msg := fmt.Sprintf("Unexpected error, attribute %v not provided in ME %v: %v",
- attrDef.GetName(), meDefinition.GetName(), m)
- return nil, errors.New(msg)
- }
- // Is space available?
- if attrDef.Size <= payloadAvailable {
- // Mark bit handled
- mask &= ^attrDef.Mask
- meLayer.AttributeMask |= attrDef.Mask
- meLayer.Attributes[attrDef.Name] = attrValue
- payloadAvailable -= attrDef.Size
-
- } else if opt.failIfTruncated {
- // TODO: Should we set truncate?
- msg := fmt.Sprintf("out-of-space. Cannot fit attribute %v into GetResponse message",
- attrDef.GetName())
- return nil, me.NewMessageTruncatedError(msg)
- } else {
- // Add to existing 'failed' mask and update result
- meLayer.FailedAttributeMask |= attrDef.Mask
- meLayer.Result = me.AttributeFailure
- }
- }
- }
- }
- }
- return meLayer, nil
-}
-
-func GetAllAlarmsRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- // Common for all MEs
- meLayer := &GetAllAlarmsRequest{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- AlarmRetrievalMode: opt.mode,
- }
- return meLayer, nil
-}
-
-func GetAllAlarmsResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- // Common for all MEs
- meLayer := &GetAllAlarmsResponse{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- NumberOfCommands: opt.sequenceNumberCountOrSize,
- }
- return meLayer, nil
-}
-
-func GetAllAlarmsNextRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- // Common for all MEs
- meLayer := &GetAllAlarmsNextRequest{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- CommandSequenceNumber: opt.sequenceNumberCountOrSize,
- }
- return meLayer, nil
-}
-
-func GetAllAlarmsNextResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- // Common for all MEs
- meLayer := &GetAllAlarmsNextResponse{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- AlarmEntityClass: opt.alarm.AlarmClassID,
- AlarmEntityInstance: opt.alarm.AlarmInstance,
- }
- if len(opt.alarm.AlarmBitmap) > 28 {
- return nil, errors.New("invalid Alarm Bitmap Size. Must be [0..27]")
- }
- for octet := 0; octet < len(opt.alarm.AlarmBitmap); octet++ {
- meLayer.AlarmBitMap[octet] = opt.alarm.AlarmBitmap[octet]
- }
- for octet := len(opt.alarm.AlarmBitmap); octet < 28; octet++ {
- meLayer.AlarmBitMap[octet] = 0
- }
- return meLayer, nil
-}
-
-func MibUploadRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- // Common for all MEs
- meLayer := &MibUploadRequest{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: 0,
- Extended: opt.frameFormat == ExtendedIdent,
- },
- }
- return meLayer, nil
-}
-
-func MibUploadResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- // Common for all MEs
- meLayer := &MibUploadResponse{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: 0,
- Extended: opt.frameFormat == ExtendedIdent,
- },
- NumberOfCommands: opt.sequenceNumberCountOrSize,
- }
- return meLayer, nil
-}
-
-func MibUploadNextRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- // Common for all MEs
- meLayer := &MibUploadNextRequest{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: 0,
- Extended: opt.frameFormat == ExtendedIdent,
- },
- CommandSequenceNumber: opt.sequenceNumberCountOrSize,
- }
- return meLayer, nil
-}
-
-func MibUploadNextResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- // Common for all MEs
- meLayer := &MibUploadNextResponse{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- }
- if opt.payload == nil {
- // Shortcut used to specify the request sequence number is out of range, encode
- // a ME instance with class ID of zero to specify this per ITU G.988
- meDef := me.ManagedEntityDefinition{
- Name: "InvalidSequenceNumberManagedEntity",
- ClassID: me.ClassID(0),
- MessageTypes: nil,
- AttributeDefinitions: make(me.AttributeDefinitionMap),
- }
- opt.payload, _ = me.NewManagedEntity(meDef)
- }
- if _, ok := opt.payload.(*[]me.ManagedEntity); ok {
- if opt.frameFormat == BaselineIdent {
- return nil, errors.New("invalid payload for Baseline message")
- }
- // TODO: List of MEs. valid for extended messages only
- } else if managedEntity, ok := opt.payload.(*me.ManagedEntity); ok {
- // Single ME
- meLayer.ReportedME = *managedEntity
- } else {
- return nil, errors.New("invalid payload for MibUploadNextResponse frame")
- }
- return meLayer, nil
-}
-
-func MibResetRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- // Common for all MEs
- meLayer := &MibResetRequest{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- }
- return meLayer, nil
-}
-
-func MibResetResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- // Common for all MEs
- meLayer := &MibResetResponse{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- Result: opt.result,
- }
- return meLayer, nil
-}
-
-func AlarmNotificationFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- mask, err := checkAttributeMask(m, opt.attributeMask)
- if err != nil {
- return nil, err
- }
- // Common for all MEs
- meLayer := &AlarmNotificationMsg{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- }
- // Get payload space available
- maxPayload := maxPacketAvailable(m, opt)
- payloadAvailable := int(maxPayload) - 1 // Less alarm sequence number
-
- // TODO: Lots of work to do
- fmt.Println(mask, maxPayload, payloadAvailable)
-
- return meLayer, errors.New("todo: Not implemented")
-}
-
-func AttributeValueChangeFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- mask, err := checkAttributeMask(m, opt.attributeMask)
- if err != nil {
- return nil, err
- }
- // Common for all MEs
- meLayer := &AttributeValueChangeMsg{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- AttributeMask: 0,
- Attributes: make(me.AttributeValueMap),
- }
- // Get payload space available
- maxPayload := maxPacketAvailable(m, opt)
- payloadAvailable := int(maxPayload) - 2 // Less attribute mask
-
- // TODO: Lots of work to do
-
- fmt.Println(mask, maxPayload, payloadAvailable)
- return meLayer, errors.New("todo: Not implemented")
-}
-
-//func TestRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
-// if opt.frameFormat == ExtendedIdent {
-// return nil, errors.New("Extended message set for this message type is not supported")
-// }
-// mask, err := checkAttributeMask(m, opt.attributeMask)
-// if err != nil {
-// return nil, err
-// }
-// // Common for all MEs
-// meLayer := &TestRequest{
-// MeBasePacket: MeBasePacket{
-// EntityClass: m.GetClassID(),
-// EntityInstance: m.GetEntityID(),
-// Extended: opt.frameFormat == ExtendedIdent,
-// },
-// }
-// // Get payload space available
-// maxPayload := maxPacketAvailable(m, opt)
-//
-// // TODO: Lots of work to do
-//
-// fmt.Println(mask, maxPayload)
-// return meLayer, errors.New("todo: Not implemented")
-//}
-
-//func TestResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
-// if opt.frameFormat == ExtendedIdent {
-// return nil, errors.New("Extended message set for this message type is not supported")
-// }
-// mask, err := checkAttributeMask(m, opt.attributeMask)
-// if err != nil {
-// return nil, err
-// }
-// // Common for all MEs
-// meLayer := &TestResponse{
-// MeBasePacket: MeBasePacket{
-// EntityClass: m.GetClassID(),
-// EntityInstance: m.GetEntityID(),
-// Extended: opt.frameFormat == ExtendedIdent,
-// },
-// }
-// // Get payload space available
-// maxPayload := maxPacketAvailable(m, opt)
-//
-// // TODO: Lots of work to do
-//
-// fmt.Println(mask, maxPayload)
-// return meLayer, errors.New("todo: Not implemented")
-//}
-
-func StartSoftwareDownloadRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- // Common for all MEs
- meLayer := &StartSoftwareDownloadRequest{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- WindowSize: opt.software.WindowSize,
- ImageSize: opt.software.ImageSize,
- NumberOfCircuitPacks: byte(len(opt.software.CircuitPacks)),
- CircuitPacks: opt.software.CircuitPacks,
- }
- // TODO: Add length check to insure we do not exceed maximum packet size
- // payloadAvailable := int(maxPacketAvailable(m, opt))
- payloadAvailable := 2
- sizeNeeded := 1
- if sizeNeeded > payloadAvailable {
- // TODO: Should we set truncate?
- msg := "out-of-space. Cannot fit Circuit Pack instances into Start Software Download Request message"
- return nil, me.NewMessageTruncatedError(msg)
- }
- return meLayer, nil
-}
-
-func StartSoftwareDownloadResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- // Common for all MEs
- meLayer := &StartSoftwareDownloadResponse{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- WindowSize: opt.software.WindowSize,
- NumberOfInstances: byte(len(opt.software.CircuitPacks)),
- MeResults: opt.software.Results,
- }
- // TODO: Add length check to insure we do not exceed maximum packet size
- // payloadAvailable := int(maxPacketAvailable(m, opt))
- payloadAvailable := 2
- sizeNeeded := 1
- if sizeNeeded > payloadAvailable {
- // TODO: Should we set truncate?
- msg := "out-of-space. Cannot fit Results into Start Software Download Response message"
- return nil, me.NewMessageTruncatedError(msg)
- }
- return meLayer, nil
-}
-
-func DownloadSectionRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.software.Data == nil {
- return nil, me.NewNonStatusError("Software image data missing")
- }
- // Common for all MEs
- meLayer := &DownloadSectionRequest{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- SectionNumber: opt.software.SectionNumber,
- SectionData: opt.software.Data,
- }
- return meLayer, nil
-}
-
-func DownloadSectionResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- // Common for all MEs
- meLayer := &DownloadSectionResponse{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- Result: opt.result,
- SectionNumber: opt.software.SectionNumber,
- }
- return meLayer, nil
-}
-
-func EndSoftwareDownloadRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- mask, err := checkAttributeMask(m, opt.attributeMask)
- if err != nil {
- return nil, err
- }
- // Common for all MEs
- meLayer := &EndSoftwareDownloadRequest{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- }
- // Get payload space available
- maxPayload := maxPacketAvailable(m, opt)
-
- // TODO: Lots of work to do
-
- fmt.Println(mask, maxPayload)
- return meLayer, errors.New("todo: Not implemented")
-}
-
-func EndSoftwareDownloadResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- mask, err := checkAttributeMask(m, opt.attributeMask)
- if err != nil {
- return nil, err
- }
- // Common for all MEs
- meLayer := &EndSoftwareDownloadResponse{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- }
- // Get payload space available
- maxPayload := maxPacketAvailable(m, opt)
-
- // TODO: Lots of work to do
-
- fmt.Println(mask, maxPayload)
- return meLayer, errors.New("todo: Not implemented")
-}
-
-func ActivateSoftwareRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- mask, err := checkAttributeMask(m, opt.attributeMask)
- if err != nil {
- return nil, err
- }
- // Common for all MEs
- meLayer := &ActivateSoftwareRequest{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- }
- // Get payload space available
- maxPayload := maxPacketAvailable(m, opt)
-
- // TODO: Lots of work to do
-
- fmt.Println(mask, maxPayload)
- return meLayer, errors.New("todo: Not implemented")
-}
-
-func ActivateSoftwareResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- mask, err := checkAttributeMask(m, opt.attributeMask)
- if err != nil {
- return nil, err
- }
- // Common for all MEs
- meLayer := &ActivateSoftwareResponse{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- }
- // Get payload space available
- maxPayload := maxPacketAvailable(m, opt)
-
- // TODO: Lots of work to do
-
- fmt.Println(mask, maxPayload)
- return meLayer, errors.New("todo: Not implemented")
-}
-
-func CommitSoftwareRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- mask, err := checkAttributeMask(m, opt.attributeMask)
- if err != nil {
- return nil, err
- }
- // Common for all MEs
- meLayer := &CommitSoftwareRequest{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- }
- // Get payload space available
- maxPayload := maxPacketAvailable(m, opt)
-
- // TODO: Lots of work to do
-
- fmt.Println(mask, maxPayload)
- return meLayer, errors.New("todo: Not implemented")
-}
-
-func CommitSoftwareResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- mask, err := checkAttributeMask(m, opt.attributeMask)
- if err != nil {
- return nil, err
- }
- // Common for all MEs
- meLayer := &CommitSoftwareResponse{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- }
- // Get payload space available
- maxPayload := maxPacketAvailable(m, opt)
-
- // TODO: Lots of work to do
-
- fmt.Println(mask, maxPayload)
- return meLayer, errors.New("todo: Not implemented")
-}
-
-func SynchronizeTimeRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- // Common for all MEs
- meLayer := &SynchronizeTimeRequest{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- }
- // Decode payload option. If nil, no timestamp provided
- if timestamp, ok := opt.payload.(int64); ok {
- tm := time.Unix(timestamp, 0)
- meLayer.Year = uint16(tm.UTC().Year())
- meLayer.Month = uint8(tm.UTC().Month())
- meLayer.Day = uint8(tm.UTC().Day())
- meLayer.Hour = uint8(tm.UTC().Hour())
- meLayer.Minute = uint8(tm.UTC().Minute())
- meLayer.Second = uint8(tm.UTC().Second())
- }
- return meLayer, nil
-}
-
-func SynchronizeTimeResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- // Common for all MEs
- meLayer := &SynchronizeTimeResponse{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- Result: opt.result,
- SuccessResults: opt.mode,
- }
- return meLayer, nil
-}
-
-func RebootRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- // Common for all MEs
- meLayer := &RebootRequest{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- RebootCondition: opt.mode,
- }
- return meLayer, nil
-}
-
-func RebootResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- // Common for all MEs
- meLayer := &RebootResponse{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- Result: opt.result,
- }
- return meLayer, nil
-}
-
-func GetNextRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- // Validate attribute mask
- mask, err := checkAttributeMask(m, opt.attributeMask)
- if err != nil {
- return nil, err
- }
- // Now scan attributes and reduce mask to only those requested
- mask, err = calculateAttributeMask(m, mask)
- if err != nil {
- return nil, err
- }
- if mask == 0 {
- return nil, errors.New("no attributes requested for GetNextRequest")
- }
- // TODO: If more than one attribute or the attribute requested is not a table attribute, return an error
- // Common for all MEs
- meLayer := &GetNextRequest{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- AttributeMask: mask,
- SequenceNumber: opt.sequenceNumberCountOrSize,
- }
- return meLayer, nil
-}
-
-func GetNextResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- // Validate attribute mask
- mask, err := checkAttributeMask(m, opt.attributeMask)
- if err != nil {
- return nil, err
- }
- mask, err = calculateAttributeMask(m, mask)
- if err != nil {
- return nil, err
- }
- //
- // Common for all MEs
- meLayer := &GetNextResponse{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- Result: opt.result,
- AttributeMask: 0,
- Attributes: make(me.AttributeValueMap),
- }
- if meLayer.Result == me.Success {
- // Get payload space available
- maxPayload := maxPacketAvailable(m, opt)
- payloadAvailable := int(maxPayload) - 3 // Less results and attribute mask
- meDefinition := m.GetManagedEntityDefinition()
- attrDefs := meDefinition.GetAttributeDefinitions()
- attrMap := m.GetAttributeValueMap()
-
- if mask == 0 {
- return nil, errors.New("no attributes requested for GetNextResponse")
- }
- // TODO: If more than one attribute or the attribute requested is not a table attribute, return an error
- // Iterate down the attributes (Attribute 0 is the ManagedEntity ID)
- var attrIndex uint
- for attrIndex = 1; attrIndex <= 16; attrIndex++ {
- // Is this attribute requested
- if mask&(1<<(16-attrIndex)) != 0 {
- // Get definitions since we need the name
- attrDef, ok := attrDefs[attrIndex]
- if !ok {
- msg := fmt.Sprintf("Unexpected error, index %v not valued for ME %v",
- attrIndex, meDefinition.GetName())
- return nil, errors.New(msg)
- }
- var attrValue interface{}
- attrValue, ok = attrMap[attrDef.Name]
- if !ok || attrValue == nil {
- msg := fmt.Sprintf("Unexpected error, attribute %v not provided in ME %v: %v",
- attrDef.GetName(), meDefinition.GetName(), m)
- return nil, errors.New(msg)
- }
- // Is space available?
- if attrDef.Size <= payloadAvailable {
- // Mark bit handled
- mask &= ^attrDef.Mask
- meLayer.AttributeMask |= attrDef.Mask
- meLayer.Attributes[attrDef.Name] = attrValue
- payloadAvailable -= attrDef.Size
- } else {
- // TODO: Should we set truncate?
- msg := fmt.Sprintf("out-of-space. Cannot fit attribute %v into GetNextResponse message",
- attrDef.GetName())
- return nil, me.NewMessageTruncatedError(msg)
- }
- }
- }
- }
- return meLayer, nil
-}
-
-//func TestResultFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
-// if opt.frameFormat == ExtendedIdent {
-// return nil, errors.New("Extended message set for this message type is not supported")
-// }
-// mask, err := checkAttributeMask(m, opt.attributeMask)
-// if err != nil {
-// return nil, err
-// }
-// // Common for all MEs
-// meLayer := &TestResultNotification{
-// MeBasePacket: MeBasePacket{
-// EntityClass: m.GetClassID(),
-// EntityInstance: m.GetEntityID(),
-// Extended: opt.frameFormat == ExtendedIdent,
-// },
-// }
-// // Get payload space available
-// maxPayload := maxPacketAvailable(m, opt)
-//
-// // TODO: Lots of work to do
-//
-// fmt.Println(mask, maxPayload)
-// return meLayer, errors.New("todo: Not implemented")
-//}
-
-func GetCurrentDataRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- mask, err := checkAttributeMask(m, opt.attributeMask)
- if err != nil {
- return nil, err
- }
- // Common for all MEs
- meLayer := &GetCurrentDataRequest{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- }
- // Get payload space available
- maxPayload := maxPacketAvailable(m, opt)
-
- // TODO: Lots of work to do
-
- fmt.Println(mask, maxPayload)
- return meLayer, errors.New("todo: Not implemented")
-}
-
-func GetCurrentDataResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- mask, err := checkAttributeMask(m, opt.attributeMask)
- if err != nil {
- return nil, err
- }
- // Common for all MEs
- meLayer := &GetCurrentDataResponse{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- }
- // Get payload space available
- maxPayload := maxPacketAvailable(m, opt)
-
- // TODO: Lots of work to do
-
- fmt.Println(mask, maxPayload)
- return meLayer, errors.New("todo: Not implemented")
-}
-
-func SetTableRequestFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat != ExtendedIdent {
- return nil, errors.New("SetTable message type only supported with Extended OMCI Messaging")
- }
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- mask, err := checkAttributeMask(m, opt.attributeMask)
- if err != nil {
- return nil, err
- }
- // Common for all MEs
- meLayer := &SetTableRequest{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: opt.frameFormat == ExtendedIdent,
- },
- }
- // Get payload space available
- maxPayload := maxPacketAvailable(m, opt)
-
- // TODO: Lots of work to do
-
- fmt.Println(mask, maxPayload)
- return meLayer, errors.New("todo: Not implemented")
-}
-
-func SetTableResponseFrame(m *me.ManagedEntity, opt options) (gopacket.SerializableLayer, error) {
- if opt.frameFormat != ExtendedIdent {
- return nil, errors.New("SetTable message type only supported with Extended OMCI Message Set")
- }
- if opt.frameFormat == ExtendedIdent {
- return nil, errors.New("Extended message set for this message type is not supported")
- }
- mask, err := checkAttributeMask(m, opt.attributeMask)
- if err != nil {
- return nil, err
- }
- // Common for all MEs
- meLayer := &SetTableResponse{
- MeBasePacket: MeBasePacket{
- EntityClass: m.GetClassID(),
- EntityInstance: m.GetEntityID(),
- Extended: true,
- },
- }
- // Get payload space available
- maxPayload := maxPacketAvailable(m, opt)
-
- // TODO: Lots of work to do
-
- fmt.Println(mask, maxPayload)
- return meLayer, errors.New("todo: Not implemented")
-}
diff --git a/vendor/github.com/opencord/omci-lib-go/messagetypes.go b/vendor/github.com/opencord/omci-lib-go/messagetypes.go
deleted file mode 100644
index 5e5dd74..0000000
--- a/vendor/github.com/opencord/omci-lib-go/messagetypes.go
+++ /dev/null
@@ -1,4332 +0,0 @@
-/*
- * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
- * Copyright 2020-present Open Networking Foundation
-
- * 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.
- */
-
-package omci
-
-import (
- "encoding/binary"
- "errors"
- "fmt"
- "github.com/google/gopacket"
- me "github.com/opencord/omci-lib-go/generated"
-)
-
-// MessageType is the OMCI Message Type or'ed with the AR/AK flags as appropriate.
-type MessageType byte
-
-const (
- CreateRequestType = MessageType(byte(me.Create) | me.AR)
- CreateResponseType = MessageType(byte(me.Create) | me.AK)
- DeleteRequestType = MessageType(byte(me.Delete) | me.AR)
- DeleteResponseType = MessageType(byte(me.Delete) | me.AK)
- SetRequestType = MessageType(byte(me.Set) | me.AR)
- SetResponseType = MessageType(byte(me.Set) | me.AK)
- GetRequestType = MessageType(byte(me.Get) | me.AR)
- GetResponseType = MessageType(byte(me.Get) | me.AK)
- GetAllAlarmsRequestType = MessageType(byte(me.GetAllAlarms) | me.AR)
- GetAllAlarmsResponseType = MessageType(byte(me.GetAllAlarms) | me.AK)
- GetAllAlarmsNextRequestType = MessageType(byte(me.GetAllAlarmsNext) | me.AR)
- GetAllAlarmsNextResponseType = MessageType(byte(me.GetAllAlarmsNext) | me.AK)
- MibUploadRequestType = MessageType(byte(me.MibUpload) | me.AR)
- MibUploadResponseType = MessageType(byte(me.MibUpload) | me.AK)
- MibUploadNextRequestType = MessageType(byte(me.MibUploadNext) | me.AR)
- MibUploadNextResponseType = MessageType(byte(me.MibUploadNext) | me.AK)
- MibResetRequestType = MessageType(byte(me.MibReset) | me.AR)
- MibResetResponseType = MessageType(byte(me.MibReset) | me.AK)
- TestRequestType = MessageType(byte(me.Test) | me.AR)
- TestResponseType = MessageType(byte(me.Test) | me.AK)
- StartSoftwareDownloadRequestType = MessageType(byte(me.StartSoftwareDownload) | me.AR)
- StartSoftwareDownloadResponseType = MessageType(byte(me.StartSoftwareDownload) | me.AK)
- DownloadSectionRequestType = MessageType(me.DownloadSection) // me.AR is optional
- DownloadSectionRequestWithResponseType = MessageType(byte(me.DownloadSection) | me.AR)
- DownloadSectionResponseType = MessageType(byte(me.DownloadSection) | me.AK)
- EndSoftwareDownloadRequestType = MessageType(byte(me.EndSoftwareDownload) | me.AR)
- EndSoftwareDownloadResponseType = MessageType(byte(me.EndSoftwareDownload) | me.AK)
- ActivateSoftwareRequestType = MessageType(byte(me.ActivateSoftware) | me.AR)
- ActivateSoftwareResponseType = MessageType(byte(me.ActivateSoftware) | me.AK)
- CommitSoftwareRequestType = MessageType(byte(me.CommitSoftware) | me.AR)
- CommitSoftwareResponseType = MessageType(byte(me.CommitSoftware) | me.AK)
- SynchronizeTimeRequestType = MessageType(byte(me.SynchronizeTime) | me.AR)
- SynchronizeTimeResponseType = MessageType(byte(me.SynchronizeTime) | me.AK)
- RebootRequestType = MessageType(byte(me.Reboot) | me.AR)
- RebootResponseType = MessageType(byte(me.Reboot) | me.AK)
- GetNextRequestType = MessageType(byte(me.GetNext) | me.AR)
- GetNextResponseType = MessageType(byte(me.GetNext) | me.AK)
- GetCurrentDataRequestType = MessageType(byte(me.GetCurrentData) | me.AR)
- GetCurrentDataResponseType = MessageType(byte(me.GetCurrentData) | me.AK)
- SetTableRequestType = MessageType(byte(me.SetTable) | me.AR)
- SetTableResponseType = MessageType(byte(me.SetTable) | me.AK)
-
- // Autonomous ONU messages
- AlarmNotificationType = MessageType(byte(me.AlarmNotification))
- AttributeValueChangeType = MessageType(byte(me.AttributeValueChange))
- TestResultType = MessageType(byte(me.TestResult))
-
- // Support mapping of extended format types (use MSB reserved bit)
- ExtendedTypeDecodeOffset = MessageType(byte(0x80))
-)
-
-func (mt MessageType) String() string {
- switch mt {
- default:
- return "Unknown"
-
- case CreateRequestType:
- return "Create Request"
- case CreateResponseType:
- return "Create Response"
- case DeleteRequestType:
- return "Delete Request"
- case DeleteResponseType:
- return "Delete Response"
- case SetRequestType:
- return "Set Request"
- case SetResponseType:
- return "Set Response"
- case GetRequestType:
- return "Get Request"
- case GetResponseType:
- return "Get Response"
- case GetAllAlarmsRequestType:
- return "Get All Alarms Request"
- case GetAllAlarmsResponseType:
- return "Get All Alarms Response"
- case GetAllAlarmsNextRequestType:
- return "Get All Alarms Next Request"
- case GetAllAlarmsNextResponseType:
- return "Get All Alarms Next Response"
- case MibUploadRequestType:
- return "MIB Upload Request"
- case MibUploadResponseType:
- return "MIB Upload Response"
- case MibUploadNextRequestType:
- return "MIB Upload Next Request"
- case MibUploadNextResponseType:
- return "MIB Upload Next Response"
- case MibResetRequestType:
- return "MIB Reset Request"
- case MibResetResponseType:
- return "MIB Reset Response"
- case TestRequestType:
- return "Test Request"
- case TestResponseType:
- return "Test Response"
- case StartSoftwareDownloadRequestType:
- return "Start Software Download Request"
- case StartSoftwareDownloadResponseType:
- return "Start Software Download Response"
- case DownloadSectionRequestType, DownloadSectionRequestWithResponseType:
- return "Download Section Request"
- case DownloadSectionResponseType:
- return "Download Section Response"
- case EndSoftwareDownloadRequestType:
- return "End Software Download Request"
- case EndSoftwareDownloadResponseType:
- return "End Software Download Response"
- case ActivateSoftwareRequestType:
- return "Activate Software Request"
- case ActivateSoftwareResponseType:
- return "Activate Software Response"
- case CommitSoftwareRequestType:
- return "Commit Software Request"
- case CommitSoftwareResponseType:
- return "Commit Software Response"
- case SynchronizeTimeRequestType:
- return "Synchronize Time Request"
- case SynchronizeTimeResponseType:
- return "Synchronize Time Response"
- case RebootRequestType:
- return "Reboot Request"
- case RebootResponseType:
- return "Reboot Response"
- case GetNextRequestType:
- return "Get Next Request"
- case GetNextResponseType:
- return "Get Next Response"
- case GetCurrentDataRequestType:
- return "Get Current Data Request"
- case GetCurrentDataResponseType:
- return "Get Current Data Response"
- case SetTableRequestType:
- return "Set Table Request"
- case SetTableResponseType:
- return "Set Table Response"
- case AlarmNotificationType:
- return "Alarm Notification"
- case AttributeValueChangeType:
- return "Attribute Value Change"
- case TestResultType:
- return "Test Result"
- }
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// CreateRequest
-type CreateRequest struct {
- MeBasePacket
- Attributes me.AttributeValueMap
-}
-
-func (omci *CreateRequest) String() string {
- return fmt.Sprintf("%v, attributes: %v", omci.MeBasePacket.String(), omci.Attributes)
-}
-
-// DecodeFromBytes decodes the given bytes of a Create Request into this layer
-func (omci *CreateRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4)
- if err != nil {
- return err
- }
- // Create attribute mask for all set-by-create entries
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Create
- if !me.SupportsMsgType(meDefinition, me.Create) {
- return me.NewProcessingError("managed entity does not support Create Message-Type")
- }
- var sbcMask uint16
- for index, attr := range meDefinition.GetAttributeDefinitions() {
- if me.SupportsAttributeAccess(attr, me.SetByCreate) {
- if index == 0 {
- continue // Skip Entity ID
- }
- sbcMask |= attr.Mask
- }
- }
- // Attribute decode
- omci.Attributes, err = meDefinition.DecodeAttributes(sbcMask, data[4:], p, byte(CreateRequestType))
- if err != nil {
- return err
- }
- if eidDef, eidDefOK := meDefinition.GetAttributeDefinitions()[0]; eidDefOK {
- omci.Attributes[eidDef.GetName()] = omci.EntityInstance
- return nil
- }
- panic("All Managed Entities have an EntityID attribute")
-}
-
-func decodeCreateRequest(data []byte, p gopacket.PacketBuilder) error {
- omci := &CreateRequest{}
- omci.MsgLayerType = LayerTypeCreateRequest
- return decodingLayerDecoder(omci, data, p)
-}
-
-// SerializeTo provides serialization of an Create Request Message
-func (omci *CreateRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- err := omci.MeBasePacket.SerializeTo(b)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // Create attribute mask of SetByCreate attributes that should be present in the provided
- // attributes.
- var sbcMask uint16
- for index, attr := range meDefinition.GetAttributeDefinitions() {
- if me.SupportsAttributeAccess(attr, me.SetByCreate) {
- if index == 0 {
- continue // Skip Entity ID
- }
- sbcMask |= attr.Mask
- }
- }
- // Attribute serialization
- // TODO: Only Baseline supported at this time
- bytesAvailable := MaxBaselineLength - 8 - 8
- err, _ = meDefinition.SerializeAttributes(omci.Attributes, sbcMask, b, byte(CreateRequestType), bytesAvailable, false)
- return err
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// CreateResponse
-type CreateResponse struct {
- MeBasePacket
- Result me.Results
- AttributeExecutionMask uint16 // Used when Result == ParameterError
-}
-
-func (omci *CreateResponse) String() string {
- return fmt.Sprintf("%v, Result: %d (%v), Mask: %#x",
- omci.MeBasePacket.String(), omci.Result, omci.Result, omci.AttributeExecutionMask)
-}
-
-// DecodeFromBytes decodes the given bytes of a Create Response into this layer
-func (omci *CreateResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4+3)
- if err != nil {
- return err
- }
- entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Create
- if !me.SupportsMsgType(entity, me.Create) {
- return me.NewProcessingError("managed entity does not support the Create Message-Type")
- }
- omci.Result = me.Results(data[4])
- if omci.Result == me.ParameterError {
- omci.AttributeExecutionMask = binary.BigEndian.Uint16(data[5:])
- // TODO: validation that attributes set in mask are SetByCreate would be good here
- }
- return nil
-}
-
-func decodeCreateResponse(data []byte, p gopacket.PacketBuilder) error {
- omci := &CreateResponse{}
- omci.MsgLayerType = LayerTypeCreateResponse
- return decodingLayerDecoder(omci, data, p)
-}
-
-// SerializeTo provides serialization of an Create Response message
-func (omci *CreateResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- err := omci.MeBasePacket.SerializeTo(b)
- if err != nil {
- return err
- }
- entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Create
- if !me.SupportsMsgType(entity, me.Create) {
- return me.NewProcessingError("managed entity does not support the Create Message-Type")
- }
- bytes, err := b.AppendBytes(3)
- if err != nil {
- return err
- }
- bytes[0] = byte(omci.Result)
- if omci.Result == me.ParameterError {
- // TODO: validation that attributes set in mask are SetByCreate would be good here
- binary.BigEndian.PutUint16(bytes[1:], omci.AttributeExecutionMask)
- } else {
- binary.BigEndian.PutUint16(bytes[1:], 0)
- }
- return nil
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// DeleteRequest
-type DeleteRequest struct {
- MeBasePacket
-}
-
-func (omci *DeleteRequest) String() string {
- return fmt.Sprintf("%v", omci.MeBasePacket.String())
-}
-
-// DecodeFromBytes decodes the given bytes of a Delete Request into this layer
-func (omci *DeleteRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4)
- if err != nil {
- return err
- }
- entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Delete
- if !me.SupportsMsgType(entity, me.Delete) {
- return me.NewProcessingError("managed entity does not support the Delete Message-Type")
- }
- return nil
-}
-
-func decodeDeleteRequest(data []byte, p gopacket.PacketBuilder) error {
- omci := &DeleteRequest{}
- omci.MsgLayerType = LayerTypeDeleteRequest
- return decodingLayerDecoder(omci, data, p)
-}
-
-// SerializeTo provides serialization of an Delete Request message
-func (omci *DeleteRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- err := omci.MeBasePacket.SerializeTo(b)
- if err != nil {
- return err
- }
- entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Delete
- if !me.SupportsMsgType(entity, me.Delete) {
- return me.NewProcessingError("managed entity does not support the Delete Message-Type")
- }
- return nil
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// DeleteResponse
-type DeleteResponse struct {
- MeBasePacket
- Result me.Results
-}
-
-func (omci *DeleteResponse) String() string {
- return fmt.Sprintf("%v, Result: %d (%v)",
- omci.MeBasePacket.String(), omci.Result, omci.Result)
-}
-
-// DecodeFromBytes decodes the given bytes of a Delete Response into this layer
-func (omci *DeleteResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4+1)
- if err != nil {
- return err
- }
- entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Delete
- if !me.SupportsMsgType(entity, me.Delete) {
- return me.NewProcessingError("managed entity does not support the Delete Message-Type")
- }
- omci.Result = me.Results(data[4])
- return nil
-}
-
-func decodeDeleteResponse(data []byte, p gopacket.PacketBuilder) error {
- omci := &DeleteResponse{}
- omci.MsgLayerType = LayerTypeDeleteResponse
- return decodingLayerDecoder(omci, data, p)
-}
-
-// SerializeTo provides serialization of an Delete Response message
-func (omci *DeleteResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- err := omci.MeBasePacket.SerializeTo(b)
- if err != nil {
- return err
- }
- entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Delete
- if !me.SupportsMsgType(entity, me.Delete) {
- return me.NewProcessingError("managed entity does not support the Delete Message-Type")
- }
- bytes, err := b.AppendBytes(1)
- if err != nil {
- return err
- }
- bytes[0] = byte(omci.Result)
- return nil
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// SetRequest
-type SetRequest struct {
- MeBasePacket
- AttributeMask uint16
- Attributes me.AttributeValueMap
-}
-
-func (omci *SetRequest) String() string {
- return fmt.Sprintf("%v, Mask: %#x, attributes: %v",
- omci.MeBasePacket.String(), omci.AttributeMask, omci.Attributes)
-}
-
-// DecodeFromBytes decodes the given bytes of a Set Request into this layer
-func (omci *SetRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4+2)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Set
- if !me.SupportsMsgType(meDefinition, me.Set) {
- return me.NewProcessingError("managed entity does not support Set Message-Type")
- }
- omci.AttributeMask = binary.BigEndian.Uint16(data[4:6])
-
- // Attribute decode
- omci.Attributes, err = meDefinition.DecodeAttributes(omci.AttributeMask, data[6:], p, byte(SetRequestType))
- if err != nil {
- return err
- }
- // Validate all attributes support write
- for attrName := range omci.Attributes {
- attr, err := me.GetAttributeDefinitionByName(meDefinition.GetAttributeDefinitions(), attrName)
- if err != nil {
- return err
- }
- if attr.Index != 0 && !me.SupportsAttributeAccess(*attr, me.Write) {
- msg := fmt.Sprintf("attribute '%v' does not support write access", attrName)
- return me.NewProcessingError(msg)
- }
- }
- if eidDef, eidDefOK := meDefinition.GetAttributeDefinitions()[0]; eidDefOK {
- omci.Attributes[eidDef.GetName()] = omci.EntityInstance
- return nil
- }
- panic("All Managed Entities have an EntityID attribute")
-}
-
-func decodeSetRequest(data []byte, p gopacket.PacketBuilder) error {
- omci := &SetRequest{}
- omci.MsgLayerType = LayerTypeSetRequest
- return decodingLayerDecoder(omci, data, p)
-}
-
-// SerializeTo provides serialization of an Set Request message
-func (omci *SetRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- err := omci.MeBasePacket.SerializeTo(b)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Set
- if !me.SupportsMsgType(meDefinition, me.Set) {
- return me.NewProcessingError("managed entity does not support Set Message-Type")
- }
- // Validate all attributes support write
- for attrName := range omci.Attributes {
- attr, err := me.GetAttributeDefinitionByName(meDefinition.GetAttributeDefinitions(), attrName)
- if err != nil {
- return err
- }
- // Do not test for write of Entity ID in the attribute list
- if attr.Index != 0 && !me.SupportsAttributeAccess(*attr, me.Write) {
- // TODO: Check ITU spec to see if this should be listed as a failed
- // attribute and not a processing error.
- msg := fmt.Sprintf("attribute '%v' does not support write access", attrName)
- return me.NewProcessingError(msg)
- }
- }
- bytes, err := b.AppendBytes(2)
- if err != nil {
- return err
- }
- binary.BigEndian.PutUint16(bytes, omci.AttributeMask)
-
- // Attribute serialization
- // TODO: Only Baseline supported at this time
- bytesAvailable := MaxBaselineLength - 10 - 8
-
- err, _ = meDefinition.SerializeAttributes(omci.Attributes, omci.AttributeMask, b,
- byte(SetRequestType), bytesAvailable, false)
- return err
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// SetResponse
-type SetResponse struct {
- MeBasePacket
- Result me.Results
- UnsupportedAttributeMask uint16
- FailedAttributeMask uint16
-}
-
-func (omci *SetResponse) String() string {
- return fmt.Sprintf("%v, Result: %d (%v), Unsupported Mask: %#x, Failed Mask: %#x",
- omci.MeBasePacket.String(), omci.Result, omci.Result, omci.UnsupportedAttributeMask,
- omci.FailedAttributeMask)
-}
-
-// DecodeFromBytes decodes the given bytes of a Set Response into this layer
-func (omci *SetResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4+5)
- if err != nil {
- return err
- }
- entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Set
- if !me.SupportsMsgType(entity, me.Set) {
- return me.NewProcessingError("managed entity does not support the Delete Message-Type")
- }
- omci.Result = me.Results(data[4])
-
- if omci.Result == me.AttributeFailure {
- omci.UnsupportedAttributeMask = binary.BigEndian.Uint16(data[5:7])
- omci.FailedAttributeMask = binary.BigEndian.Uint16(data[7:9])
- }
- return nil
-}
-
-func decodeSetResponse(data []byte, p gopacket.PacketBuilder) error {
- omci := &SetResponse{}
- omci.MsgLayerType = LayerTypeSetResponse
- return decodingLayerDecoder(omci, data, p)
-}
-
-// SerializeTo provides serialization of an Set Response message
-func (omci *SetResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- err := omci.MeBasePacket.SerializeTo(b)
- if err != nil {
- return err
- }
- entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Set
- if !me.SupportsMsgType(entity, me.Set) {
- return me.NewProcessingError("managed entity does not support the Set Message-Type")
- }
- bytes, err := b.AppendBytes(5)
- if err != nil {
- return err
- }
- bytes[0] = byte(omci.Result)
- binary.BigEndian.PutUint16(bytes[1:3], omci.UnsupportedAttributeMask)
- binary.BigEndian.PutUint16(bytes[3:5], omci.FailedAttributeMask)
- return nil
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// GetRequest
-type GetRequest struct {
- MeBasePacket
- AttributeMask uint16
-}
-
-func (omci *GetRequest) String() string {
- return fmt.Sprintf("%v, Mask: %#x",
- omci.MeBasePacket.String(), omci.AttributeMask)
-}
-
-// DecodeFromBytes decodes the given bytes of a Get Request into this layer
-func (omci *GetRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4+2)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Get
- if !me.SupportsMsgType(meDefinition, me.Get) {
- return me.NewProcessingError("managed entity does not support Get Message-Type")
- }
- if omci.Extended {
- if len(data) < 8 {
- p.SetTruncated()
- return errors.New("frame too small")
- }
- omci.AttributeMask = binary.BigEndian.Uint16(data[6:])
- } else {
- omci.AttributeMask = binary.BigEndian.Uint16(data[4:])
- }
- return nil
-}
-
-func decodeGetRequest(data []byte, p gopacket.PacketBuilder) error {
- omci := &GetRequest{}
- omci.MsgLayerType = LayerTypeGetRequest
- return decodingLayerDecoder(omci, data, p)
-}
-
-func decodeGetRequestExtended(data []byte, p gopacket.PacketBuilder) error {
- omci := &GetRequest{}
- omci.MsgLayerType = LayerTypeGetRequest
- omci.Extended = true
- return decodingLayerDecoder(omci, data, p)
-}
-
-// SerializeTo provides serialization of an Get Request message
-func (omci *GetRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- err := omci.MeBasePacket.SerializeTo(b)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Set
- if !me.SupportsMsgType(meDefinition, me.Get) {
- return me.NewProcessingError("managed entity does not support Get Message-Type")
- }
- maskOffset := 0
- if omci.Extended {
- maskOffset = 2
- }
- bytes, err := b.AppendBytes(2 + maskOffset)
- if err != nil {
- return err
- }
- if omci.Extended {
- binary.BigEndian.PutUint16(bytes, uint16(2))
- }
- binary.BigEndian.PutUint16(bytes[maskOffset:], omci.AttributeMask)
- return nil
-}
-
-func (omci *GetRequest) SerializeToExtended(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- return nil
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// GetResponse
-type GetResponse struct {
- MeBasePacket
- Result me.Results
- AttributeMask uint16
- Attributes me.AttributeValueMap
- UnsupportedAttributeMask uint16
- FailedAttributeMask uint16
-}
-
-func (omci *GetResponse) String() string {
- return fmt.Sprintf("%v, Result: %d (%v), Mask: %#x, Unsupported: %#x, Failed: %#x, attributes: %v",
- omci.MeBasePacket.String(), omci.Result, omci.Result, omci.AttributeMask,
- omci.UnsupportedAttributeMask, omci.FailedAttributeMask, omci.Attributes)
-}
-
-// DecodeFromBytes decodes the given bytes of a Get Response into this layer
-func (omci *GetResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4+3)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Get
- if !me.SupportsMsgType(meDefinition, me.Get) {
- return me.NewProcessingError("managed entity does not support Get Message-Type")
- }
- if omci.Extended {
- if len(data) < 13 {
- p.SetTruncated()
- return errors.New("frame too small")
- }
- omci.Result = me.Results(data[6])
- omci.AttributeMask = binary.BigEndian.Uint16(data[7:])
-
- // If Attribute failed or Unknown, decode optional attribute mask
- if omci.Result == me.AttributeFailure {
- omci.UnsupportedAttributeMask = binary.BigEndian.Uint16(data[9:])
- omci.FailedAttributeMask = binary.BigEndian.Uint16(data[11:])
- }
- } else {
- omci.Result = me.Results(data[4])
- omci.AttributeMask = binary.BigEndian.Uint16(data[5:])
-
- // If Attribute failed or Unknown, decode optional attribute mask
- if omci.Result == me.AttributeFailure {
- omci.UnsupportedAttributeMask = binary.BigEndian.Uint16(data[32:34])
- omci.FailedAttributeMask = binary.BigEndian.Uint16(data[34:36])
- }
- }
- // Attribute decode. Note that the ITU-T G.988 specification states that the
- // Unsupported and Failed attribute masks are always present
- // but only valid if the status code== 9. However some XGS
- // ONUs (T&W and Alpha, perhaps more) will use these last 4
- // octets for data if the status code == 0. So accommodate
- // this behaviour in favor of greater interoperability.
- firstOctet := 7
- lastOctet := 36
- if omci.Extended {
- firstOctet = 13
- lastOctet = len(data)
- }
-
- switch omci.Result {
- case me.ProcessingError, me.NotSupported, me.UnknownEntity, me.UnknownInstance, me.DeviceBusy:
- return nil // Done (do not try and decode attributes)
-
- case me.AttributeFailure:
- if !omci.Extended {
- lastOctet = 32
- }
- }
- omci.Attributes, err = meDefinition.DecodeAttributes(omci.AttributeMask,
- data[firstOctet:lastOctet], p, byte(GetResponseType))
- if err != nil {
- return err
- }
- // Validate all attributes support read
- for attrName := range omci.Attributes {
- attr, err := me.GetAttributeDefinitionByName(meDefinition.GetAttributeDefinitions(), attrName)
- if err != nil {
- return err
- }
- if attr.Index != 0 && !me.SupportsAttributeAccess(*attr, me.Read) {
- msg := fmt.Sprintf("attribute '%v' does not support read access", attrName)
- return me.NewProcessingError(msg)
- }
- }
- if eidDef, eidDefOK := meDefinition.GetAttributeDefinitions()[0]; eidDefOK {
- omci.Attributes[eidDef.GetName()] = omci.EntityInstance
- return nil
- }
- panic("All Managed Entities have an EntityID attribute")
-}
-
-func decodeGetResponse(data []byte, p gopacket.PacketBuilder) error {
- omci := &GetResponse{}
- omci.MsgLayerType = LayerTypeGetResponse
- return decodingLayerDecoder(omci, data, p)
-}
-
-func decodeGetResponseExtended(data []byte, p gopacket.PacketBuilder) error {
- omci := &GetResponse{}
- omci.MsgLayerType = LayerTypeGetResponse
- omci.Extended = true
- return decodingLayerDecoder(omci, data, p)
-}
-
-// SerializeTo provides serialization of an Get Response message
-func (omci *GetResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- if err := omci.MeBasePacket.SerializeTo(b); err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
-
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Get
- if !me.SupportsMsgType(meDefinition, me.Get) {
- return me.NewProcessingError("managed entity does not support the Get Message-Type")
- }
- resultOffset := 0
- attributeErrExtra := 0
-
- if omci.Extended {
- resultOffset = 2
- attributeErrExtra = 4 // Attribute mask + attribute error masks
- }
- // Space for result + mask (both types) + (len & error masks if extended)
- buffer, err := b.AppendBytes(3 + resultOffset + attributeErrExtra)
- if err != nil {
- return err
- }
- // Save result and initial mask. Other header fields updated after
- // attribute copy
- buffer[resultOffset] = byte(omci.Result)
- binary.BigEndian.PutUint16(buffer[resultOffset+1:], omci.AttributeMask)
-
- // Validate all attributes support read
- for attrName := range omci.Attributes {
- var attr *me.AttributeDefinition
- attr, err = me.GetAttributeDefinitionByName(meDefinition.GetAttributeDefinitions(), attrName)
- if err != nil {
- return err
- }
- if attr.Index != 0 && !me.SupportsAttributeAccess(*attr, me.Read) {
- msg := fmt.Sprintf("attribute '%v' does not support read access", attrName)
- return me.NewProcessingError(msg)
- }
- }
- // Attribute serialization
- switch omci.Result {
- default:
- if omci.Extended {
- // Minimum length is 7 for extended an need to write error masks
- binary.BigEndian.PutUint16(buffer, uint16(7))
- binary.BigEndian.PutUint32(buffer[resultOffset+3:], 0)
- }
- break
-
- case me.Success, me.AttributeFailure:
- // TODO: Baseline only supported at this time)
- var available int
- if omci.Extended {
- available = MaxExtendedLength - 18 - 4 // Less: header, mic
- } else {
- available = MaxBaselineLength - 11 - 4 - 8 // Less: header, failed attributes, length, mic
- }
- // Serialize to temporary buffer if we may need to reset values due to
- // recoverable truncation errors
- attributeBuffer := gopacket.NewSerializeBuffer()
- var failedMask uint16
- err, failedMask = meDefinition.SerializeAttributes(omci.Attributes, omci.AttributeMask,
- attributeBuffer, byte(GetResponseType), available, opts.FixLengths)
-
- if err != nil {
- return err
- }
- if failedMask != 0 {
- // Not all attributes would fit
- omci.FailedAttributeMask |= failedMask
- omci.AttributeMask &= ^failedMask
- omci.Result = me.AttributeFailure
-
- // Adjust already recorded values
- buffer[resultOffset] = byte(omci.Result)
- binary.BigEndian.PutUint16(buffer[resultOffset+1:], omci.AttributeMask)
- }
- if omci.Extended {
- // Set length and any failure masks
- binary.BigEndian.PutUint16(buffer, uint16(len(attributeBuffer.Bytes())+7))
-
- if omci.Result == me.AttributeFailure {
- binary.BigEndian.PutUint16(buffer[resultOffset+3:], omci.UnsupportedAttributeMask)
- binary.BigEndian.PutUint16(buffer[resultOffset+5:], omci.FailedAttributeMask)
- } else {
- binary.BigEndian.PutUint32(buffer[resultOffset+3:], 0)
- }
- }
- // Copy over attributes to the original serialization buffer
- var newSpace []byte
-
- newSpace, err = b.AppendBytes(len(attributeBuffer.Bytes()))
- if err != nil {
- return err
- }
- copy(newSpace, attributeBuffer.Bytes())
-
- if !omci.Extended {
- // Calculate space left. Max - msgType header - OMCI trailer - spacedUsedSoFar
- bytesLeft := MaxBaselineLength - 4 - 8 - len(b.Bytes())
-
- var remainingBytes []byte
- remainingBytes, err = b.AppendBytes(bytesLeft + 4)
-
- if err != nil {
- return me.NewMessageTruncatedError(err.Error())
- }
- copy(remainingBytes, lotsOfZeros[:])
-
- if omci.Result == me.AttributeFailure {
- binary.BigEndian.PutUint16(remainingBytes[bytesLeft-4:bytesLeft-2], omci.UnsupportedAttributeMask)
- binary.BigEndian.PutUint16(remainingBytes[bytesLeft-2:bytesLeft], omci.FailedAttributeMask)
- }
- }
- }
- return nil
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// GetAllAlarms
-type GetAllAlarmsRequest struct {
- MeBasePacket
- AlarmRetrievalMode byte
-}
-
-func (omci *GetAllAlarmsRequest) String() string {
- return fmt.Sprintf("%v, Retrieval Mode: %v",
- omci.MeBasePacket.String(), omci.AlarmRetrievalMode)
-}
-
-// DecodeFromBytes decodes the given bytes of a Get All Alarms Request into this layer
-func (omci *GetAllAlarmsRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4+1)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Get All Alarms
- if !me.SupportsMsgType(meDefinition, me.GetAllAlarms) {
- return me.NewProcessingError("managed entity does not support Get All Alarms Message-Type")
- }
- // Entity Class are always ONU DATA (2) and Entity Instance of 0
- if omci.EntityClass != me.OnuDataClassID {
- msg := fmt.Sprintf("invalid Entity Class for Get All Alarms request: %v",
- omci.EntityClass)
- return me.NewProcessingError(msg)
- }
- if omci.EntityInstance != 0 {
- msg := fmt.Sprintf("invalid Entity Instance for Get All Alarms request: %v",
- omci.EntityInstance)
- return me.NewUnknownInstanceError(msg)
- }
- omci.AlarmRetrievalMode = data[4]
- if omci.AlarmRetrievalMode > 1 {
- msg := fmt.Sprintf("invalid Alarm Retrieval Mode for Get All Alarms request: %v, must be 0..1",
- omci.AlarmRetrievalMode)
- return errors.New(msg)
- }
- return nil
-}
-
-func decodeGetAllAlarmsRequest(data []byte, p gopacket.PacketBuilder) error {
- omci := &GetAllAlarmsRequest{}
- omci.MsgLayerType = LayerTypeGetAllAlarmsRequest
- return decodingLayerDecoder(omci, data, p)
-}
-
-// SerializeTo provides serialization of an Get All Alarms Request message
-func (omci *GetAllAlarmsRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- err := omci.MeBasePacket.SerializeTo(b)
- if err != nil {
- return err
- }
- entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Get All Alarms
- if !me.SupportsMsgType(entity, me.GetAllAlarms) {
- return me.NewProcessingError("managed entity does not support the Get All Alarms Message-Type")
- }
- bytes, err := b.AppendBytes(1)
- if err != nil {
- return err
- }
- bytes[0] = omci.AlarmRetrievalMode
- return nil
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// GetAllAlarms
-type GetAllAlarmsResponse struct {
- MeBasePacket
- NumberOfCommands uint16
-}
-
-func (omci *GetAllAlarmsResponse) String() string {
- return fmt.Sprintf("%v, NumberOfCommands: %d",
- omci.MeBasePacket.String(), omci.NumberOfCommands)
-}
-
-// DecodeFromBytes decodes the given bytes of a Get All Alarms Response into this layer
-func (omci *GetAllAlarmsResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4+2)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Get All Alarms
- if !me.SupportsMsgType(meDefinition, me.GetAllAlarms) {
- return me.NewProcessingError("managed entity does not support Get All Alarms Message-Type")
- }
- // Entity Class are always ONU DATA (2) and Entity Instance of 0
- if omci.EntityClass != me.OnuDataClassID {
- msg := fmt.Sprintf("invalid Entity Class for Get All Alarms response: %v",
- omci.EntityClass)
- return me.NewProcessingError(msg)
- }
- if omci.EntityInstance != 0 {
- msg := fmt.Sprintf("invalid Entity Instance for Get All Alarms response: %v",
- omci.EntityInstance)
- return me.NewUnknownInstanceError(msg)
- }
- omci.NumberOfCommands = binary.BigEndian.Uint16(data[4:6])
- return nil
-}
-
-func decodeGetAllAlarmsResponse(data []byte, p gopacket.PacketBuilder) error {
- omci := &GetAllAlarmsResponse{}
- omci.MsgLayerType = LayerTypeGetAllAlarmsResponse
- return decodingLayerDecoder(omci, data, p)
-}
-
-// SerializeTo provides serialization of an Get All Alarms Response message
-func (omci *GetAllAlarmsResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- err := omci.MeBasePacket.SerializeTo(b)
- if err != nil {
- return err
- }
- entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Get All Alarms
- if !me.SupportsMsgType(entity, me.GetAllAlarms) {
- return me.NewProcessingError("managed entity does not support the Get All Alarms Message-Type")
- }
- bytes, err := b.AppendBytes(2)
- if err != nil {
- return err
- }
- binary.BigEndian.PutUint16(bytes[0:2], omci.NumberOfCommands)
- return nil
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// GetAllAlarms
-type GetAllAlarmsNextRequest struct {
- MeBasePacket
- CommandSequenceNumber uint16
-}
-
-func (omci *GetAllAlarmsNextRequest) String() string {
- return fmt.Sprintf("%v, Sequence Number: %d",
- omci.MeBasePacket.String(), omci.CommandSequenceNumber)
-}
-
-// DecodeFromBytes decodes the given bytes of a Get All Alarms Next Request into this layer
-func (omci *GetAllAlarmsNextRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4+2)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Get All Alarms
- if !me.SupportsMsgType(meDefinition, me.GetAllAlarmsNext) {
- return me.NewProcessingError("managed entity does not support Get All Alarms Next Message-Type")
- }
- // Entity Class are always ONU DATA (2) and Entity Instance of 0
- if omci.EntityClass != me.OnuDataClassID {
- msg := fmt.Sprintf("invalid Entity Class for Get All Alarms Next request: %v",
- omci.EntityClass)
- return me.NewProcessingError(msg)
- }
- if omci.EntityInstance != 0 {
- msg := fmt.Sprintf("invalid Entity Instance for Get All Alarms Next request: %v",
- omci.EntityInstance)
- return me.NewUnknownInstanceError(msg)
- }
- omci.CommandSequenceNumber = binary.BigEndian.Uint16(data[4:6])
- return nil
-}
-
-func decodeGetAllAlarmsNextRequest(data []byte, p gopacket.PacketBuilder) error {
- omci := &GetAllAlarmsNextRequest{}
- omci.MsgLayerType = LayerTypeGetAllAlarmsNextRequest
- return decodingLayerDecoder(omci, data, p)
-}
-
-// SerializeTo provides serialization of an Get All Alarms Next Request message
-func (omci *GetAllAlarmsNextRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- err := omci.MeBasePacket.SerializeTo(b)
- if err != nil {
- return err
- }
- entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Get All Alarms Next
- if !me.SupportsMsgType(entity, me.GetAllAlarmsNext) {
- return me.NewProcessingError("managed entity does not support the Get All Alarms Next Message-Type")
- }
- bytes, err := b.AppendBytes(2)
- if err != nil {
- return err
- }
- binary.BigEndian.PutUint16(bytes, omci.CommandSequenceNumber)
- return nil
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// GetAllAlarms
-type GetAllAlarmsNextResponse struct {
- MeBasePacket
- AlarmEntityClass me.ClassID
- AlarmEntityInstance uint16
- AlarmBitMap [28]byte // 224 bits
-}
-
-func (omci *GetAllAlarmsNextResponse) String() string {
- return fmt.Sprintf("%v, CID: %v, EID: (%d/%#x), Bitmap: %v",
- omci.MeBasePacket.String(), omci.AlarmEntityClass, omci.AlarmEntityInstance,
- omci.AlarmEntityInstance, omci.AlarmBitMap)
-}
-
-// DecodeFromBytes decodes the given bytes of a Get All Alarms Next Response into this layer
-func (omci *GetAllAlarmsNextResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4+4+28)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Get All Alarms Next
- if !me.SupportsMsgType(meDefinition, me.GetAllAlarmsNext) {
- return me.NewProcessingError("managed entity does not support Get All Alarms Next Message-Type")
- }
- // Entity Class are always ONU DATA (2) and Entity Instance of 0
- if omci.EntityClass != me.OnuDataClassID {
- msg := fmt.Sprintf("invalid Entity Class for Get All Alarms Next response: %v",
- omci.EntityClass)
- return me.NewProcessingError(msg)
- }
- if omci.EntityInstance != 0 {
- msg := fmt.Sprintf("invalid Entity Instance for Get All Alarms Next response: %v",
- omci.EntityInstance)
- return me.NewUnknownInstanceError(msg)
- }
- omci.AlarmEntityClass = me.ClassID(binary.BigEndian.Uint16(data[4:6]))
- omci.AlarmEntityInstance = binary.BigEndian.Uint16(data[6:8])
-
- copy(omci.AlarmBitMap[:], data[8:36])
- return nil
-}
-
-func decodeGetAllAlarmsNextResponse(data []byte, p gopacket.PacketBuilder) error {
- omci := &GetAllAlarmsNextResponse{}
- omci.MsgLayerType = LayerTypeGetAllAlarmsNextResponse
- return decodingLayerDecoder(omci, data, p)
-}
-
-// SerializeTo provides serialization of an Get All Alarms Next Response message
-func (omci *GetAllAlarmsNextResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- err := omci.MeBasePacket.SerializeTo(b)
- if err != nil {
- return err
- }
- entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Get All Alarms Next
- if !me.SupportsMsgType(entity, me.GetAllAlarmsNext) {
- return me.NewProcessingError("managed entity does not support the Get All Alarms Next Message-Type")
- }
- bytes, err := b.AppendBytes(2 + 2 + 28)
- if err != nil {
- return err
- }
- binary.BigEndian.PutUint16(bytes[0:], uint16(omci.AlarmEntityClass))
- binary.BigEndian.PutUint16(bytes[2:], omci.AlarmEntityInstance)
- copy(bytes[4:], omci.AlarmBitMap[:])
- return nil
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// MibUploadRequest
-type MibUploadRequest struct {
- MeBasePacket
-}
-
-func (omci *MibUploadRequest) String() string {
- return fmt.Sprintf("%v", omci.MeBasePacket.String())
-}
-
-// DecodeFromBytes decodes the given bytes of a MIB Upload Request into this layer
-func (omci *MibUploadRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support MIB Upload
- if !me.SupportsMsgType(meDefinition, me.MibUpload) {
- return me.NewProcessingError("managed entity does not support MIB Upload Message-Type")
- }
- // Entity Class are always ONU DATA (2) and Entity Instance of 0
- if omci.EntityClass != me.OnuDataClassID {
- msg := fmt.Sprintf("invalid Entity Class for MIB Upload request: %v",
- omci.EntityClass)
- return me.NewProcessingError(msg)
- }
- if omci.EntityInstance != 0 {
- msg := fmt.Sprintf("invalid Entity Instance for MIB Upload request: %v",
- omci.EntityInstance)
- return me.NewUnknownInstanceError(msg)
- }
- return nil
-}
-
-func decodeMibUploadRequest(data []byte, p gopacket.PacketBuilder) error {
- omci := &MibUploadRequest{}
- omci.MsgLayerType = LayerTypeMibUploadRequest
- return decodingLayerDecoder(omci, data, p)
-}
-
-// SerializeTo provides serialization of an MIB Upload Request message
-func (omci *MibUploadRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- err := omci.MeBasePacket.SerializeTo(b)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Get
- if !me.SupportsMsgType(meDefinition, me.MibUpload) {
- return me.NewProcessingError("managed entity does not support the MIB Upload Message-Type")
- }
- return nil
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// MibUploadResponse
-type MibUploadResponse struct {
- MeBasePacket
- NumberOfCommands uint16
-}
-
-func (omci *MibUploadResponse) String() string {
- return fmt.Sprintf("%v, NumberOfCommands: %#v",
- omci.MeBasePacket.String(), omci.NumberOfCommands)
-}
-
-// DecodeFromBytes decodes the given bytes of a MIB Upload Response into this layer
-func (omci *MibUploadResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4+2)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support MIB Upload
- if !me.SupportsMsgType(meDefinition, me.MibUpload) {
- return me.NewProcessingError("managed entity does not support MIB Upload Message-Type")
- }
- // Entity Class are always ONU DATA (2) and Entity Instance of 0
- if omci.EntityClass != me.OnuDataClassID {
- msg := fmt.Sprintf("invalid Entity Class for MIB Upload response: %v",
- omci.EntityClass)
- return me.NewProcessingError(msg)
- }
- if omci.EntityInstance != 0 {
- msg := fmt.Sprintf("invalid Entity Instance for MIB Upload response: %v",
- omci.EntityInstance)
- return me.NewUnknownInstanceError(msg)
- }
- omci.NumberOfCommands = binary.BigEndian.Uint16(data[4:6])
- return nil
-}
-
-func decodeMibUploadResponse(data []byte, p gopacket.PacketBuilder) error {
- omci := &MibUploadResponse{}
- omci.MsgLayerType = LayerTypeMibUploadResponse
- return decodingLayerDecoder(omci, data, p)
-}
-
-// SerializeTo provides serialization of an MIB Upload Response message
-func (omci *MibUploadResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- err := omci.MeBasePacket.SerializeTo(b)
- if err != nil {
- return err
- }
- entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support MIB Upload
- if !me.SupportsMsgType(entity, me.MibUpload) {
- return me.NewProcessingError("managed entity does not support the MIB Upload Message-Type")
- }
- bytes, err := b.AppendBytes(2)
- if err != nil {
- return err
- }
- binary.BigEndian.PutUint16(bytes[0:2], omci.NumberOfCommands)
- return nil
-}
-
-/////////////////////////////////////////////////////////////////////////////
-//
-type MibUploadNextRequest struct {
- MeBasePacket
- CommandSequenceNumber uint16
-}
-
-func (omci *MibUploadNextRequest) String() string {
- return fmt.Sprintf("%v, SequenceNumberCountOrSize: %v",
- omci.MeBasePacket.String(), omci.CommandSequenceNumber)
-}
-
-// DecodeFromBytes decodes the given bytes of a MIB Upload Next Request into this layer
-func (omci *MibUploadNextRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4+2)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Get All Alarms
- if !me.SupportsMsgType(meDefinition, me.MibUploadNext) {
- return me.NewProcessingError("managed entity does not support MIB Upload Next Message-Type")
- }
- // Entity Class are always ONU DATA (2) and Entity Instance of 0
- if omci.EntityClass != me.OnuDataClassID {
- msg := fmt.Sprintf("invalid Entity Class for MIB Upload Next request: %v",
- omci.EntityClass)
- return me.NewProcessingError(msg)
- }
- if omci.EntityInstance != 0 {
- msg := fmt.Sprintf("invalid Entity Instance for MIB Upload Next request: %v",
- omci.EntityInstance)
- return me.NewUnknownInstanceError(msg)
- }
- omci.CommandSequenceNumber = binary.BigEndian.Uint16(data[4:6])
- return nil
-}
-
-func decodeMibUploadNextRequest(data []byte, p gopacket.PacketBuilder) error {
- omci := &MibUploadNextRequest{}
- omci.MsgLayerType = LayerTypeMibUploadNextRequest
- return decodingLayerDecoder(omci, data, p)
-}
-
-// SerializeTo provides serialization of an MIB Upload Next Request message
-func (omci *MibUploadNextRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- err := omci.MeBasePacket.SerializeTo(b)
- if err != nil {
- return err
- }
- entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support MIB upload
- if !me.SupportsMsgType(entity, me.MibUploadNext) {
- return me.NewProcessingError("managed entity does not support the MIB Upload Next Message-Type")
- }
- bytes, err := b.AppendBytes(2)
- if err != nil {
- return err
- }
- binary.BigEndian.PutUint16(bytes[0:2], omci.CommandSequenceNumber)
- return nil
-}
-
-/////////////////////////////////////////////////////////////////////////////
-//
-type MibUploadNextResponse struct {
- MeBasePacket
- ReportedME me.ManagedEntity
-}
-
-func (omci *MibUploadNextResponse) String() string {
- return fmt.Sprintf("%v, ReportedME: [%v]",
- omci.MeBasePacket.String(), omci.ReportedME.String())
-}
-
-// DecodeFromBytes decodes the given bytes of a MIB Upload Next Response into this layer
-func (omci *MibUploadNextResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4+6)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support MibUploadNext
- if !me.SupportsMsgType(meDefinition, me.MibUploadNext) {
- return me.NewProcessingError("managed entity does not support MIB Upload Next Message-Type")
- }
- // Entity Class are always ONU DATA (2) and Entity Instance of 0
- if omci.EntityClass != me.OnuDataClassID {
- msg := fmt.Sprintf("invalid Entity Class for MIB Upload Next response: %v",
- omci.EntityClass)
- return me.NewProcessingError(msg)
- }
- if omci.EntityInstance != 0 {
- msg := fmt.Sprintf("invalid Entity Instance for MIB Upload Next response: %v",
- omci.EntityInstance)
- return me.NewUnknownInstanceError(msg)
- }
- // Decode reported ME. If an out-of-range sequence number was sent, this will
- // contain an ME with class ID and entity ID of zero and you should get an
- // error of "managed entity definition not found" returned.
- return omci.ReportedME.DecodeFromBytes(data[4:], p, byte(MibUploadNextResponseType))
-}
-
-func decodeMibUploadNextResponse(data []byte, p gopacket.PacketBuilder) error {
- omci := &MibUploadNextResponse{}
- omci.MsgLayerType = LayerTypeMibUploadNextResponse
- return decodingLayerDecoder(omci, data, p)
-}
-
-// SerializeTo provides serialization of an MIB Upload Next Response message
-func (omci *MibUploadNextResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- err := omci.MeBasePacket.SerializeTo(b)
- if err != nil {
- return err
- }
- entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support MIB Upload
- if !me.SupportsMsgType(entity, me.MibUploadNext) {
- return me.NewProcessingError("managed entity does not support the MIB Upload Next Message-Type")
- }
- // TODO: Only Baseline supported at this time
- bytesAvailable := MaxBaselineLength - 8 - 8
-
- return omci.ReportedME.SerializeTo(b, byte(MibUploadNextResponseType), bytesAvailable, opts)
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// MibResetRequest
-type MibResetRequest struct {
- MeBasePacket
-}
-
-func (omci *MibResetRequest) String() string {
- return fmt.Sprintf("%v", omci.MeBasePacket.String())
-}
-
-// DecodeFromBytes decodes the given bytes of a MIB Reset Request into this layer
-func (omci *MibResetRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support MIB reset
- if !me.SupportsMsgType(meDefinition, me.MibReset) {
- return me.NewProcessingError("managed entity does not support MIB Reset Message-Type")
- }
- // Entity Class are always ONU DATA (2) and Entity Instance of 0
- if omci.EntityClass != me.OnuDataClassID {
- msg := fmt.Sprintf("invalid Entity Class for MIB Reset request: %v",
- omci.EntityClass)
- return me.NewProcessingError(msg)
- }
- if omci.EntityInstance != 0 {
- msg := fmt.Sprintf("invalid Entity Instance for MIB Reset request: %v",
- omci.EntityInstance)
- return me.NewUnknownInstanceError(msg)
- }
- return nil
-}
-
-func decodeMibResetRequest(data []byte, p gopacket.PacketBuilder) error {
- omci := &MibResetRequest{}
- omci.MsgLayerType = LayerTypeMibResetRequest
- return decodingLayerDecoder(omci, data, p)
-}
-
-// SerializeTo provides serialization of an MIB Reset Request message
-func (omci *MibResetRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Add class ID and entity ID
- return omci.MeBasePacket.SerializeTo(b)
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// MibResetResponse
-type MibResetResponse struct {
- MeBasePacket
- Result me.Results
-}
-
-func (omci *MibResetResponse) String() string {
- return fmt.Sprintf("%v, Result: %d (%v)",
- omci.MeBasePacket.String(), omci.Result, omci.Result)
-}
-
-// DecodeFromBytes decodes the given bytes of a MIB Reset Response into this layer
-func (omci *MibResetResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4+1)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support MIB reset
- if !me.SupportsMsgType(meDefinition, me.MibReset) {
- return me.NewProcessingError("managed entity does not support MIB Reset Message-Type")
- }
- // MIB Reset Response Entity Class always ONU DATA (2) and
- // Entity Instance of 0
- if omci.EntityClass != me.OnuDataClassID {
- return me.NewProcessingError("invalid Entity Class for MIB Reset Response")
- }
- if omci.EntityInstance != 0 {
- return me.NewUnknownInstanceError("invalid Entity Instance for MIB Reset Response")
- }
- omci.Result = me.Results(data[4])
- if omci.Result > me.DeviceBusy {
- msg := fmt.Sprintf("invalid results code: %v, must be 0..6", omci.Result)
- return errors.New(msg)
- }
- return nil
-}
-
-func decodeMibResetResponse(data []byte, p gopacket.PacketBuilder) error {
- omci := &MibResetResponse{}
- omci.MsgLayerType = LayerTypeMibResetResponse
- return decodingLayerDecoder(omci, data, p)
-}
-
-// SerializeTo provides serialization of an MIB Reset Response message
-func (omci *MibResetResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- err := omci.MeBasePacket.SerializeTo(b)
- if err != nil {
- return err
- }
- entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Set
- if !me.SupportsMsgType(entity, me.MibReset) {
- return me.NewProcessingError("managed entity does not support the MIB Reset Message-Type")
- }
- bytes, err := b.AppendBytes(1)
- if err != nil {
- return err
- }
- bytes[0] = byte(omci.Result)
- return nil
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// AlarmNotificationMsg
-const AlarmBitmapSize = 224
-
-type AlarmNotificationMsg struct {
- MeBasePacket
- AlarmBitmap [AlarmBitmapSize / 8]byte
- zeroPadding [3]byte // Note: This zero padding is not present in the Extended Message Set
- AlarmSequenceNumber byte
-}
-
-func (omci *AlarmNotificationMsg) String() string {
- return fmt.Sprintf("%v, Sequence Number: %d, Alarm Bitmap: %v",
- omci.MeBasePacket.String(), omci.AlarmSequenceNumber, omci.AlarmBitmap)
-}
-
-func (omci *AlarmNotificationMsg) IsAlarmActive(alarmNumber uint8) (bool, error) {
- if alarmNumber >= AlarmBitmapSize {
- msg := fmt.Sprintf("invalid alarm number: %v, must be 0..224", alarmNumber)
- return false, errors.New(msg)
- }
- entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return false, omciErr.GetError()
- }
- alarmMap := entity.GetAlarmMap()
- if alarmMap == nil {
- msg := "Managed Entity does not support Alarm notifications"
- return false, errors.New(msg)
- }
- if _, ok := alarmMap[alarmNumber]; !ok {
- msg := fmt.Sprintf("unsupported invalid alarm number: %v", alarmNumber)
- return false, errors.New(msg)
- }
- octet := alarmNumber / 8
- bit := 7 - (alarmNumber % 8)
- return omci.AlarmBitmap[octet]>>bit == 1, nil
-}
-
-func (omci *AlarmNotificationMsg) IsAlarmClear(alarmNumber uint8) (bool, error) {
- if alarmNumber >= AlarmBitmapSize {
- msg := fmt.Sprintf("invalid alarm number: %v, must be 0..224", alarmNumber)
- return false, errors.New(msg)
- }
- entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return false, omciErr.GetError()
- }
- alarmMap := entity.GetAlarmMap()
- if alarmMap == nil {
- return false, errors.New("Managed Entity does not support Alarm notifications")
- }
- if _, ok := alarmMap[alarmNumber]; !ok {
- msg := fmt.Sprintf("unsupported invalid alarm number: %v", alarmNumber)
- return false, errors.New(msg)
- }
- octet := alarmNumber / 8
- bit := 7 - (alarmNumber % 8)
- return omci.AlarmBitmap[octet]>>bit == 0, nil
-}
-
-func (omci *AlarmNotificationMsg) ActivateAlarm(alarmNumber uint8) error {
- if alarmNumber >= AlarmBitmapSize {
- msg := fmt.Sprintf("invalid alarm number: %v, must be 0..224", alarmNumber)
- return errors.New(msg)
- }
- entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- alarmMap := entity.GetAlarmMap()
- if alarmMap == nil {
- return errors.New("Managed Entity does not support Alarm notifications")
- }
- if _, ok := alarmMap[alarmNumber]; !ok {
- msg := fmt.Sprintf("unsupported invalid alarm number: %v", alarmNumber)
- return errors.New(msg)
- }
- octet := alarmNumber / 8
- bit := 7 - (alarmNumber % 8)
- omci.AlarmBitmap[octet] |= 1 << bit
- return nil
-}
-
-func (omci *AlarmNotificationMsg) ClearAlarm(alarmNumber uint8) error {
- if alarmNumber >= AlarmBitmapSize {
- msg := fmt.Sprintf("invalid alarm number: %v, must be 0..224", alarmNumber)
- return errors.New(msg)
- }
- entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- alarmMap := entity.GetAlarmMap()
- if alarmMap == nil {
- return errors.New("Managed Entity does not support Alarm notifications")
- }
- if _, ok := alarmMap[alarmNumber]; !ok {
- msg := fmt.Sprintf("unsupported invalid alarm number: %v", alarmNumber)
- return errors.New(msg)
- }
- octet := alarmNumber / 8
- bit := 7 - (alarmNumber % 8)
- omci.AlarmBitmap[octet] &= ^(1 << bit)
- return nil
-}
-
-// DecodeFromBytes decodes the given bytes of an Alarm Notification into this layer
-func (omci *AlarmNotificationMsg) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4+28)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // Is this an unsupported or vendor specific ME. If so, it is not an error to decode
- // the alarms. We just cannot provide any alarm names. Handle decode here.
- classSupport := meDefinition.GetClassSupport()
- isUnsupported := classSupport == me.UnsupportedManagedEntity ||
- classSupport == me.UnsupportedVendorSpecificManagedEntity
-
- mapOffset := 4
- if omci.Extended {
- mapOffset = 6
- if len(data) < 6+28+1 {
- p.SetTruncated()
- return errors.New("frame too small")
- }
- }
- // Look for a non-nil/not empty Alarm Map to determine if this ME supports alarms
- if alarmMap := meDefinition.GetAlarmMap(); isUnsupported || (alarmMap != nil && len(alarmMap) > 0) {
- for index, octet := range data[mapOffset : (AlarmBitmapSize/8)-mapOffset] {
- omci.AlarmBitmap[index] = octet
- }
- if omci.Extended {
- omci.AlarmSequenceNumber = data[mapOffset+(AlarmBitmapSize/8)]
- } else {
- padOffset := mapOffset + (AlarmBitmapSize / 8)
- omci.zeroPadding[0] = data[padOffset]
- omci.zeroPadding[1] = data[padOffset+1]
- omci.zeroPadding[2] = data[padOffset+2]
- omci.AlarmSequenceNumber = data[padOffset+3]
- }
- return nil
- }
- return me.NewProcessingError("managed entity does not support alarm notifications")
-}
-
-func decodeAlarmNotification(data []byte, p gopacket.PacketBuilder) error {
- omci := &AlarmNotificationMsg{}
- omci.MsgLayerType = LayerTypeAlarmNotification
- return decodingLayerDecoder(omci, data, p)
-}
-
-func decodeAlarmNotificationExtended(data []byte, p gopacket.PacketBuilder) error {
- omci := &AlarmNotificationMsg{}
- omci.MsgLayerType = LayerTypeAlarmNotification
- omci.Extended = true
- return decodingLayerDecoder(omci, data, p)
-}
-
-// SerializeTo provides serialization of an Alarm Notification message
-func (omci *AlarmNotificationMsg) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- err := omci.MeBasePacket.SerializeTo(b)
- if err != nil {
- return err
- }
- // TODO: Support of encoding AlarmNotification into supported types not yet supported
- //meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- // me.ParamData{EntityID: omci.EntityInstance})
- //if omciErr.StatusCode() != me.Success {
- // return omciErr.GetError()
- //}
- //if !me.SupportsMsgType(meDefinition, me.AlarmNotification) {
- // return me.NewProcessingError("managed entity does not support Alarm Notification Message-Type")
- //}
- if omci.Extended {
- bytes, err := b.AppendBytes(2 + (AlarmBitmapSize / 8) + 1)
- if err != nil {
- return err
- }
- binary.BigEndian.PutUint16(bytes, uint16((AlarmBitmapSize/8)+1))
-
- for index, octet := range omci.AlarmBitmap {
- bytes[2+index] = octet
- }
- bytes[2+(AlarmBitmapSize/8)] = omci.AlarmSequenceNumber
- } else {
- bytes, err := b.AppendBytes((AlarmBitmapSize / 8) + 3 + 1)
- if err != nil {
- return err
- }
- for index, octet := range omci.AlarmBitmap {
- bytes[index] = octet
- }
- padOffset := AlarmBitmapSize / 8
- bytes[padOffset] = 0
- bytes[padOffset+1] = 0
- bytes[padOffset+2] = 0
- bytes[padOffset+3] = omci.AlarmSequenceNumber
- }
- return nil
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// AttributeValueChangeMsg
-type AttributeValueChangeMsg struct {
- MeBasePacket
- AttributeMask uint16
- Attributes me.AttributeValueMap
-}
-
-func (omci *AttributeValueChangeMsg) String() string {
- return fmt.Sprintf("%v, Mask: %#x, attributes: %v",
- omci.MeBasePacket.String(), omci.AttributeMask, omci.Attributes)
-}
-
-// DecodeFromBytes decodes the given bytes of an Attribute Value Change notification into this layer
-func (omci *AttributeValueChangeMsg) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4+2)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // TODO: Support for encoding AVC into message type support not yet supported
- //if !me.SupportsMsgType(meDefinition, me.AlarmNotification) {
- // return me.NewProcessingError("managed entity does not support Alarm Notification Message-Type")
- //}
- maskOffset := 4
- if omci.Extended {
- maskOffset = 6
- }
- omci.AttributeMask = binary.BigEndian.Uint16(data[maskOffset:])
- // Attribute decode
- omci.Attributes, err = meDefinition.DecodeAttributes(omci.AttributeMask, data[maskOffset+2:],
- p, byte(AttributeValueChangeType))
- // TODO: Add support for attributes that can have an AVC associated with them and then add a check here
- // Validate all attributes support AVC
- //for attrName := range omci.attributes {
- // attr, err := me.GetAttributeDefinitionByName(meDefinition.GetAttributeDefinitions(), attrName)
- // if err != nil {
- // return err
- // }
- // if attr.Index != 0 && !me.SupportsAttributeAVC(attr) {
- // msg := fmt.Sprintf("attribute '%v' does not support AVC notifications", attrName)
- // return me.NewProcessingError(msg)
- // }
- //}
- return err
-}
-
-func decodeAttributeValueChange(data []byte, p gopacket.PacketBuilder) error {
- omci := &AttributeValueChangeMsg{}
- omci.MsgLayerType = LayerTypeAttributeValueChange
- return decodingLayerDecoder(omci, data, p)
-}
-
-func decodeAttributeValueChangeExtended(data []byte, p gopacket.PacketBuilder) error {
- omci := &AttributeValueChangeMsg{}
- omci.MsgLayerType = LayerTypeAttributeValueChange
- omci.Extended = true
- return decodingLayerDecoder(omci, data, p)
-}
-
-// SerializeTo provides serialization of an Attribute Value Change Notification message
-func (omci *AttributeValueChangeMsg) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- err := omci.MeBasePacket.SerializeTo(b)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // TODO: Add support for attributes that can have an AVC associated with them and then add a check here
- // Validate all attributes support AVC
- //for attrName := range omci.attributes {
- // attr, err := me.GetAttributeDefinitionByName(meDefinition.GetAttributeDefinitions(), attrName)
- // if err != nil {
- // return err
- // }
- // if attr.Index != 0 && !me.SupportsAttributeAVC(attr) {
- // msg := fmt.Sprintf("attribute '%v' does not support AVC notifications", attrName)
- // return me.NewProcessingError(msg)
- // }
- //}
- var maskOffset int
- var bytesAvailable int
- if omci.Extended {
- maskOffset = 2
- bytesAvailable = MaxExtendedLength - 12 - 4
- } else {
- maskOffset = 0
- bytesAvailable = MaxBaselineLength - 10 - 8
- }
- bytes, err := b.AppendBytes(maskOffset + 2)
- if err != nil {
- return err
- }
- binary.BigEndian.PutUint16(bytes[maskOffset:], omci.AttributeMask)
-
- // Attribute serialization
- attributeBuffer := gopacket.NewSerializeBuffer()
- if err, _ = meDefinition.SerializeAttributes(omci.Attributes, omci.AttributeMask,
- attributeBuffer, byte(GetResponseType), bytesAvailable, false); err != nil {
- return err
- }
-
- if omci.Extended {
- binary.BigEndian.PutUint16(bytes, uint16(len(attributeBuffer.Bytes())+2))
- }
- bytes, err = b.AppendBytes(len(attributeBuffer.Bytes()))
- if err != nil {
- return err
- }
- copy(bytes, attributeBuffer.Bytes())
- return err
-}
-
-func decodeTestRequest(data []byte, p gopacket.PacketBuilder) error {
- // Peek at Managed Entity Type
- if len(data) < 8 {
- p.SetTruncated()
- return errors.New("frame too small")
- }
- classID := binary.BigEndian.Uint16(data)
-
- // Is it a Managed Entity class we support customized decode of?
- switch me.ClassID(classID) {
- default:
- omci := &TestRequest{}
- omci.MsgLayerType = LayerTypeTestRequest
- return decodingLayerDecoder(omci, data, p)
-
- case me.AniGClassID, me.ReAniGClassID, me.PhysicalPathTerminationPointReUniClassID,
- me.ReUpstreamAmplifierClassID, me.ReDownstreamAmplifierClassID:
- omci := &OpticalLineSupervisionTestRequest{}
- omci.MsgLayerType = LayerTypeTestRequest
- return decodingLayerDecoder(omci, data, p)
- }
-}
-
-// TestRequest message
-type TestRequest struct {
- MeBasePacket
- Payload []byte
-}
-
-func (omci *TestRequest) String() string {
- return fmt.Sprintf("%v, Request: %v octets", omci.MeBasePacket.String(), len(omci.Payload))
-}
-
-func (omci *TestRequest) TestRequest() []byte {
- return omci.Payload
-}
-
-// DecodeFromBytes decodes the given bytes of a Test Request into this layer
-func (omci *TestRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4)
- if err != nil {
- return err
- }
-
- omci.Payload = make([]byte, MaxTestRequestLength)
- copy(omci.Payload, omci.MeBasePacket.Payload)
- return nil
-}
-
-// SerializeTo provides serialization of an Test Request message
-func (omci *TestRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- err := omci.MeBasePacket.SerializeTo(b)
- if err != nil {
- return err
- }
- if omci.Payload == nil {
- return errors.New("Test Results payload is missing")
- }
-
- if len(omci.Payload) > MaxTestRequestLength {
- msg := fmt.Sprintf("Invalid Test Request payload size. Received %v bytes, expected %v",
- len(omci.Payload), MaxTestRequestLength)
- return errors.New(msg)
- }
- bytes, err := b.AppendBytes(len(omci.Payload))
- if err != nil {
- return err
- }
-
- copy(bytes, omci.Payload)
- return nil
-}
-
-type OpticalLineSupervisionTestRequest struct {
- MeBasePacket
- SelectTest uint8 // Bitfield
- GeneralPurposeBuffer uint16 // Pointer to General Purpose Buffer ME
- VendorSpecificParameters uint16 // Pointer to Octet String ME
-}
-
-func (omci *OpticalLineSupervisionTestRequest) String() string {
- return fmt.Sprintf("Optical Line Supervision Test Result: SelectTest: %#x, Buffer: %#x, Params: %#x",
- omci.SelectTest, omci.GeneralPurposeBuffer, omci.VendorSpecificParameters)
-}
-
-func (omci *OpticalLineSupervisionTestRequest) TestRequest() []byte {
- return omci.Payload
-}
-
-// DecodeFromBytes decodes the given bytes of a Test Result Notification into this layer
-func (omci *OpticalLineSupervisionTestRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4+5)
- if err != nil {
- return err
- }
-
- omci.SelectTest = data[4]
- omci.GeneralPurposeBuffer = binary.BigEndian.Uint16(data[5:])
- omci.VendorSpecificParameters = binary.BigEndian.Uint16(data[7:])
- return nil
-}
-
-// SerializeTo provides serialization of an Test Result notification message
-func (omci *OpticalLineSupervisionTestRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- err := omci.MeBasePacket.SerializeTo(b)
- if err != nil {
- return err
- }
-
- bytes, err := b.AppendBytes(8)
- if err != nil {
- return err
- }
-
- bytes[0] = omci.SelectTest
- binary.BigEndian.PutUint16(bytes[1:], omci.GeneralPurposeBuffer)
- binary.BigEndian.PutUint16(bytes[3:], omci.VendorSpecificParameters)
- return nil
-}
-
-// TestResponse message
-type TestResponse struct {
- MeBasePacket
- Result me.Results
-}
-
-func (omci *TestResponse) String() string {
- return fmt.Sprintf("%v, Results: %d (%v)", omci.MeBasePacket.String(), omci.Result, omci.Result)
-}
-
-// DecodeFromBytes decodes the given bytes of a Test Response into this layer
-func (omci *TestResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4+1)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
-
- // ME needs to support Test requests
- if !me.SupportsMsgType(meDefinition, me.Test) {
- return me.NewProcessingError("managed entity does not support Test Message-Type")
- }
- omci.Result = me.Results(data[4])
- return nil
-}
-
-func decodeTestResponse(data []byte, p gopacket.PacketBuilder) error {
- omci := &TestResponse{}
- omci.MsgLayerType = LayerTypeTestResponse
- return decodingLayerDecoder(omci, data, p)
-}
-
-// SerializeTo provides serialization of an Test Response message
-func (omci *TestResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- err := omci.MeBasePacket.SerializeTo(b)
- if err != nil {
- return err
- }
- entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Set
- if !me.SupportsMsgType(entity, me.Test) {
- return me.NewProcessingError("managed entity does not support the Test Message-Type")
- }
- bytes, err := b.AppendBytes(1)
- if err != nil {
- return err
- }
- bytes[0] = byte(omci.Result)
-
- if omci.Result > me.DeviceBusy {
- msg := fmt.Sprintf("invalid results code: %v, must be 0..6", omci.Result)
- return errors.New(msg)
- }
- return nil
-}
-
-/////////////////////////////////////////////////////////////////////////////
-//
-type StartSoftwareDownloadRequest struct {
- MeBasePacket // Note: EntityInstance for software download is two specific values
- WindowSize byte // Window Size -1
- ImageSize uint32 // Octets
- NumberOfCircuitPacks byte
- CircuitPacks []uint16 // MSB & LSB of software image instance
-}
-
-func (omci *StartSoftwareDownloadRequest) String() string {
- return fmt.Sprintf("%v, Window Size: %v, Image Size: %v, # Circuit Packs: %v",
- omci.MeBasePacket.String(), omci.WindowSize, omci.ImageSize, omci.NumberOfCircuitPacks)
-}
-
-// DecodeFromBytes decodes the given bytes of a Start Software Download Request into this layer
-func (omci *StartSoftwareDownloadRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4+4)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Start Software Download
- if !me.SupportsMsgType(meDefinition, me.StartSoftwareDownload) {
- return me.NewProcessingError("managed entity does not support Start Software Download Message-Type")
- }
- // Software Image Entity Class are always use the Software Image
- if omci.EntityClass != me.SoftwareImageClassID {
- return me.NewProcessingError("invalid Entity Class for Start Software Download request")
- }
- omci.WindowSize = data[4]
- omci.ImageSize = binary.BigEndian.Uint32(data[5:9])
- omci.NumberOfCircuitPacks = data[9]
- if omci.NumberOfCircuitPacks < 1 || omci.NumberOfCircuitPacks > 9 {
- return me.NewProcessingError(fmt.Sprintf("invalid number of Circuit Packs: %v, must be 1..9",
- omci.NumberOfCircuitPacks))
- }
- omci.CircuitPacks = make([]uint16, omci.NumberOfCircuitPacks)
- for index := 0; index < int(omci.NumberOfCircuitPacks); index++ {
- omci.CircuitPacks[index] = binary.BigEndian.Uint16(data[10+(index*2):])
- }
- return nil
-}
-
-func decodeStartSoftwareDownloadRequest(data []byte, p gopacket.PacketBuilder) error {
- omci := &StartSoftwareDownloadRequest{}
- omci.MsgLayerType = LayerTypeStartSoftwareDownloadRequest
- return decodingLayerDecoder(omci, data, p)
-}
-
-// SerializeTo provides serialization of an Start Software Download Request message
-func (omci *StartSoftwareDownloadRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- err := omci.MeBasePacket.SerializeTo(b)
- if err != nil {
- return err
- }
- entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Start Software Download
- if !me.SupportsMsgType(entity, me.StartSoftwareDownload) {
- return me.NewProcessingError("managed entity does not support the SStart Software Download Message-Type")
- }
- // Software Image Entity Class are always use the Software Image
- if omci.EntityClass != me.SoftwareImageClassID {
- return me.NewProcessingError("invalid Entity Class for Start Software Download request")
- }
- if omci.NumberOfCircuitPacks < 1 || omci.NumberOfCircuitPacks > 9 {
- return me.NewProcessingError(fmt.Sprintf("invalid number of Circuit Packs: %v, must be 1..9",
- omci.NumberOfCircuitPacks))
- }
- bytes, err := b.AppendBytes(6 + (2 * int(omci.NumberOfCircuitPacks)))
- if err != nil {
- return err
- }
- bytes[0] = omci.WindowSize
- binary.BigEndian.PutUint32(bytes[1:], omci.ImageSize)
- bytes[5] = omci.NumberOfCircuitPacks
- for index := 0; index < int(omci.NumberOfCircuitPacks); index++ {
- binary.BigEndian.PutUint16(bytes[6+(index*2):], omci.CircuitPacks[index])
- }
- return nil
-}
-
-/////////////////////////////////////////////////////////////////////////////
-//
-type DownloadResults struct {
- ManagedEntityID uint16 // ME ID of software image entity instance (slot number plus instance 0..1 or 2..254 vendor-specific)
- Result me.Results
-}
-
-func (dr *DownloadResults) String() string {
- return fmt.Sprintf("ME: %v (%#x), Results: %d (%v)", dr.ManagedEntityID, dr.ManagedEntityID,
- dr.Result, dr.Result)
-}
-
-type StartSoftwareDownloadResponse struct {
- MeBasePacket // Note: EntityInstance for software download is two specific values
- Result me.Results
- WindowSize byte // Window Size -1
- NumberOfInstances byte
- MeResults []DownloadResults
-}
-
-func (omci *StartSoftwareDownloadResponse) String() string {
- return fmt.Sprintf("%v, Results: %v, Window Size: %v, # of Instances: %v, ME Results: %v",
- omci.MeBasePacket.String(), omci.Result, omci.WindowSize, omci.NumberOfInstances, omci.MeResults)
-}
-
-// DecodeFromBytes decodes the given bytes of a Start Software Download Response into this layer
-func (omci *StartSoftwareDownloadResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4+3)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Start Software Download
- if !me.SupportsMsgType(meDefinition, me.StartSoftwareDownload) {
- return me.NewProcessingError("managed entity does not support Start Software Download Message-Type")
- }
- // Software Image Entity Class are always use the Software Image
- if omci.EntityClass != me.SoftwareImageClassID {
- return me.NewProcessingError("invalid Entity Class for Start Software Download response")
- }
- omci.Result = me.Results(data[4])
- if omci.Result > me.DeviceBusy {
- msg := fmt.Sprintf("invalid results for Start Software Download response: %v, must be 0..6",
- omci.Result)
- return errors.New(msg)
- }
- omci.WindowSize = data[5]
- omci.NumberOfInstances = data[6]
-
- if omci.NumberOfInstances > 9 {
- msg := fmt.Sprintf("invalid number of Circuit Packs: %v, must be 0..9",
- omci.NumberOfInstances)
- return errors.New(msg)
- }
- if omci.NumberOfInstances > 0 {
- omci.MeResults = make([]DownloadResults, omci.NumberOfInstances)
-
- for index := 0; index < int(omci.NumberOfInstances); index++ {
- omci.MeResults[index].ManagedEntityID = binary.BigEndian.Uint16(data[7+(index*3):])
- omci.MeResults[index].Result = me.Results(data[9+(index*3)])
- if omci.MeResults[index].Result > me.DeviceBusy {
- msg := fmt.Sprintf("invalid results for Start Software Download instance %v response: %v, must be 0..6",
- index, omci.MeResults[index])
- return errors.New(msg)
- }
- }
- }
- return nil
-}
-
-func decodeStartSoftwareDownloadResponse(data []byte, p gopacket.PacketBuilder) error {
- omci := &StartSoftwareDownloadResponse{}
- omci.MsgLayerType = LayerTypeStartSoftwareDownloadResponse
- return decodingLayerDecoder(omci, data, p)
-}
-
-// SerializeTo provides serialization of an Start Software Download Response message
-func (omci *StartSoftwareDownloadResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- err := omci.MeBasePacket.SerializeTo(b)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Start Software Download
- if !me.SupportsMsgType(meDefinition, me.StartSoftwareDownload) {
- return me.NewProcessingError("managed entity does not support Start Software Download Message-Type")
- }
- // Software Image Entity Class are always use the Software Image
- if omci.EntityClass != me.SoftwareImageClassID {
- return me.NewProcessingError("invalid Entity Class for Start Software Download response")
- }
- bytes, err := b.AppendBytes(3 + (3 * int(omci.NumberOfInstances)))
- if err != nil {
- return err
- }
- if omci.Result > me.DeviceBusy {
- msg := fmt.Sprintf("invalid results for Start Software Download response: %v, must be 0..6",
- omci.Result)
- return errors.New(msg)
- }
- bytes[0] = byte(omci.Result)
- bytes[1] = omci.WindowSize
- bytes[2] = omci.NumberOfInstances
-
- if omci.NumberOfInstances > 9 {
- msg := fmt.Sprintf("invalid number of Circuit Packs: %v, must be 0..9",
- omci.NumberOfInstances)
- return errors.New(msg)
- }
- if omci.NumberOfInstances > 0 {
- for index := 0; index < int(omci.NumberOfInstances); index++ {
- binary.BigEndian.PutUint16(bytes[3+(3*index):], omci.MeResults[index].ManagedEntityID)
-
- if omci.MeResults[index].Result > me.DeviceBusy {
- msg := fmt.Sprintf("invalid results for Start Software Download instance %v response: %v, must be 0..6",
- index, omci.MeResults[index])
- return errors.New(msg)
- }
- bytes[5+(3*index)] = byte(omci.MeResults[index].Result)
- }
- }
- return nil
-}
-
-// DownloadSectionRequest data is bound by the message set in use. For the
-// Baseline message set use MaxDownloadSectionLength and for the Extended message
-// set, MaxDownloadSectionExtendedLength is provided
-type DownloadSectionRequest struct {
- MeBasePacket // Note: EntityInstance for software download is two specific values
- SectionNumber byte
- SectionData []byte // 0 padding if final transfer requires only a partial block for baseline set
-}
-
-func (omci *DownloadSectionRequest) String() string {
- return fmt.Sprintf("%v, Section #: %v, Data Length: %v",
- omci.MeBasePacket.String(), omci.SectionNumber, len(omci.SectionData))
-}
-
-// DecodeFromBytes decodes the given bytes of a Download Section Request into this layer
-func (omci *DownloadSectionRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4+1)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Download section
- if !me.SupportsMsgType(meDefinition, me.DownloadSection) {
- return me.NewProcessingError("managed entity does not support Download Section Message-Type")
- }
- // Software Image Entity Class are always use the Software Image
- if omci.EntityClass != me.SoftwareImageClassID {
- return me.NewProcessingError("invalid Entity Class for Download Section request")
- }
- if omci.Extended {
- if len(data) < 7 {
- p.SetTruncated()
- return errors.New("frame too small")
- }
- if len(data[7:]) > MaxDownloadSectionExtendedLength {
- return errors.New(fmt.Sprintf("software image data too large. Received %v, Max: %v",
- len(data[7:]), MaxDownloadSectionExtendedLength))
- }
- omci.SectionData = make([]byte, len(data[7:]))
- omci.SectionNumber = data[6]
- copy(omci.SectionData, data[7:])
- } else {
- if len(data[5:]) != MaxDownloadSectionLength {
- p.SetTruncated()
- return errors.New(fmt.Sprintf("software image size invalid. Received %v, Expected: %v",
- len(data[5:]), MaxDownloadSectionLength))
- }
- omci.SectionData = make([]byte, MaxDownloadSectionLength)
- omci.SectionNumber = data[4]
- copy(omci.SectionData, data[5:])
- }
- return nil
-}
-
-func decodeDownloadSectionRequest(data []byte, p gopacket.PacketBuilder) error {
- omci := &DownloadSectionRequest{}
- omci.MsgLayerType = LayerTypeDownloadSectionRequest
- return decodingLayerDecoder(omci, data, p)
-}
-
-func decodeDownloadSectionRequestExtended(data []byte, p gopacket.PacketBuilder) error {
- omci := &DownloadSectionRequest{}
- omci.MsgLayerType = LayerTypeDownloadSectionRequest
- omci.Extended = true
- return decodingLayerDecoder(omci, data, p)
-}
-
-// SerializeTo provides serialization of an Download Section Request message
-func (omci *DownloadSectionRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- err := omci.MeBasePacket.SerializeTo(b)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Download section
- if !me.SupportsMsgType(meDefinition, me.DownloadSection) {
- return me.NewProcessingError("managed entity does not support Download Section Message-Type")
- }
- // Software Image Entity Class are always use the Software Image
- if omci.EntityClass != me.SoftwareImageClassID {
- return me.NewProcessingError("invalid Entity Class for Download Section response")
- }
- sectionLength := len(omci.SectionData)
- if omci.Extended {
- if sectionLength > MaxDownloadSectionExtendedLength {
- msg := fmt.Sprintf("invalid Download Section data length, must be <= %v, received: %v",
- MaxDownloadSectionExtendedLength, sectionLength)
- return me.NewProcessingError(msg)
- }
- // Append section data
- bytes, err := b.AppendBytes(3 + sectionLength)
- if err != nil {
- return err
- }
- binary.BigEndian.PutUint16(bytes, uint16(1+sectionLength))
- bytes[2] = omci.SectionNumber
- copy(bytes[3:], omci.SectionData)
- } else {
- if sectionLength > MaxDownloadSectionLength {
- msg := fmt.Sprintf("invalid Download Section data length, must be <= %v, received: %v",
- MaxDownloadSectionLength, sectionLength)
- return me.NewProcessingError(msg)
- }
- // Append section data
- bytes, err := b.AppendBytes(1 + MaxDownloadSectionLength)
- if err != nil {
- return err
- }
- bytes[0] = omci.SectionNumber
- copy(bytes[1:], omci.SectionData)
-
- // Zero extended if needed
- if sectionLength < MaxDownloadSectionLength {
- copy(omci.SectionData[sectionLength:], lotsOfZeros[:MaxDownloadSectionLength-sectionLength])
- }
- }
- return nil
-}
-
-/////////////////////////////////////////////////////////////////////////////
-//
-type DownloadSectionResponse struct {
- MeBasePacket // Note: EntityInstance for software download is two specific values
- Result me.Results
- SectionNumber byte
-}
-
-func (omci *DownloadSectionResponse) String() string {
- return fmt.Sprintf("%v, Result: %d (%v), Section #: %v",
- omci.MeBasePacket.String(), omci.Result, omci.Result, omci.SectionNumber)
-}
-
-// DecodeFromBytes decodes the given bytes of a Download Section Response into this layer
-func (omci *DownloadSectionResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4+2)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Download section
- if !me.SupportsMsgType(meDefinition, me.DownloadSection) {
- return me.NewProcessingError("managed entity does not support Download Section Message-Type")
- }
- // Software Image Entity Class are always use the Software Image
- if omci.EntityClass != me.SoftwareImageClassID {
- return me.NewProcessingError("invalid Entity Class for Download Section response")
- }
- if omci.Extended {
- if len(data) < 8 {
- p.SetTruncated()
- return errors.New("frame too small")
- }
- omci.Result = me.Results(data[6])
- omci.SectionNumber = data[7]
- } else {
- omci.Result = me.Results(data[4])
- omci.SectionNumber = data[5]
- }
- if omci.Result > me.DeviceBusy {
- msg := fmt.Sprintf("invalid results for Download Section response: %v, must be 0..6",
- omci.Result)
- return errors.New(msg)
- }
- return nil
-}
-
-func decodeDownloadSectionResponse(data []byte, p gopacket.PacketBuilder) error {
- omci := &DownloadSectionResponse{}
- omci.MsgLayerType = LayerTypeDownloadSectionResponse
- return decodingLayerDecoder(omci, data, p)
-}
-
-func decodeDownloadSectionResponseExtended(data []byte, p gopacket.PacketBuilder) error {
- omci := &DownloadSectionResponse{}
- omci.MsgLayerType = LayerTypeDownloadSectionResponse
- omci.Extended = true
- return decodingLayerDecoder(omci, data, p)
-}
-
-// SerializeTo provides serialization of an Download Section Response message
-func (omci *DownloadSectionResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- err := omci.MeBasePacket.SerializeTo(b)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Download section
- if !me.SupportsMsgType(meDefinition, me.DownloadSection) {
- return me.NewProcessingError("managed entity does not support Download Section Message-Type")
- }
- // Software Image Entity Class are always use the Software Image
- if omci.EntityClass != me.SoftwareImageClassID {
- return me.NewProcessingError("invalid Entity Class for Download Section response")
- }
- if omci.Result > me.DeviceBusy {
- msg := fmt.Sprintf("invalid results for Download Section response: %v, must be 0..6",
- omci.Result)
- return errors.New(msg)
- }
- if omci.Extended {
- bytes, err := b.AppendBytes(4)
- if err != nil {
- return err
- }
- binary.BigEndian.PutUint16(bytes, uint16(2))
- bytes[2] = byte(omci.Result)
- bytes[3] = omci.SectionNumber
- } else {
- bytes, err := b.AppendBytes(2)
- if err != nil {
- return err
- }
- bytes[0] = byte(omci.Result)
- bytes[1] = omci.SectionNumber
- }
- return nil
-}
-
-/////////////////////////////////////////////////////////////////////////////
-//
-type EndSoftwareDownloadRequest struct {
- MeBasePacket // Note: EntityInstance for software download is two specific values
- CRC32 uint32
- ImageSize uint32
- NumberOfInstances byte
- ImageInstances []uint16
-}
-
-func (omci *EndSoftwareDownloadRequest) String() string {
- return fmt.Sprintf("%v, CRC: %#x, Image Size: %v, Number of Instances: %v, Instances: %v",
- omci.MeBasePacket.String(), omci.CRC32, omci.ImageSize, omci.NumberOfInstances, omci.ImageInstances)
-}
-
-// DecodeFromBytes decodes the given bytes of an End Software Download Request into this layer
-func (omci *EndSoftwareDownloadRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4+7)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support End Software Download
- if !me.SupportsMsgType(meDefinition, me.EndSoftwareDownload) {
- return me.NewProcessingError("managed entity does not support End Software Download Message-Type")
- }
- // Software Image Entity Class are always use the Software Image
- if omci.EntityClass != me.SoftwareImageClassID {
- return me.NewProcessingError("invalid Entity Class for End Software Download request")
- }
- omci.CRC32 = binary.BigEndian.Uint32(data[4:8])
- omci.ImageSize = binary.BigEndian.Uint32(data[8:12])
- omci.NumberOfInstances = data[12]
-
- if omci.NumberOfInstances < 1 || omci.NumberOfInstances > 9 {
- return me.NewProcessingError(fmt.Sprintf("invalid number of Instances: %v, must be 1..9",
- omci.NumberOfInstances))
- }
- omci.ImageInstances = make([]uint16, omci.NumberOfInstances)
-
- for index := 0; index < int(omci.NumberOfInstances); index++ {
- omci.ImageInstances[index] = binary.BigEndian.Uint16(data[13+(index*2):])
- }
- return nil
-}
-
-func decodeEndSoftwareDownloadRequest(data []byte, p gopacket.PacketBuilder) error {
- omci := &EndSoftwareDownloadRequest{}
- omci.MsgLayerType = LayerTypeEndSoftwareDownloadRequest
- return decodingLayerDecoder(omci, data, p)
-}
-
-// SerializeTo provides serialization of an End Software Download Request message
-func (omci *EndSoftwareDownloadRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- err := omci.MeBasePacket.SerializeTo(b)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support End Software Download
- if !me.SupportsMsgType(meDefinition, me.EndSoftwareDownload) {
- return me.NewProcessingError("managed entity does not support Start End Download Message-Type")
- }
- // Software Image Entity Class are always use the Software Image
- if omci.EntityClass != me.SoftwareImageClassID {
- return me.NewProcessingError("invalid Entity Class for End Software Download response")
- }
- if omci.NumberOfInstances < 1 || omci.NumberOfInstances > 9 {
- return me.NewProcessingError(fmt.Sprintf("invalid number of Instances: %v, must be 1..9",
- omci.NumberOfInstances))
- }
- bytes, err := b.AppendBytes(9 + (2 * int(omci.NumberOfInstances)))
- if err != nil {
- return err
- }
- binary.BigEndian.PutUint32(bytes[0:4], omci.CRC32)
- binary.BigEndian.PutUint32(bytes[4:8], omci.ImageSize)
- bytes[8] = omci.NumberOfInstances
- for index := 0; index < int(omci.NumberOfInstances); index++ {
- binary.BigEndian.PutUint16(bytes[9+(index*2):], omci.ImageInstances[index])
- }
- return nil
-}
-
-/////////////////////////////////////////////////////////////////////////////
-//
-type EndSoftwareDownloadResponse struct {
- MeBasePacket // Note: EntityInstance for software download is two specific values
- Result me.Results
- NumberOfInstances byte
- MeResults []DownloadResults
-}
-
-func (omci *EndSoftwareDownloadResponse) String() string {
- return fmt.Sprintf("%v, Result: %d (%v), Number of Instances: %v, ME Results: %v",
- omci.MeBasePacket.String(), omci.Result, omci.Result, omci.NumberOfInstances, omci.MeResults)
-}
-
-// DecodeFromBytes decodes the given bytes of an End Software Download Response into this layer
-func (omci *EndSoftwareDownloadResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4+2)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support End Software Download
- if !me.SupportsMsgType(meDefinition, me.EndSoftwareDownload) {
- return me.NewProcessingError("managed entity does not support End Software Download Message-Type")
- }
- // Software Image Entity Class are always use the Software Image
- if omci.EntityClass != me.SoftwareImageClassID {
- return me.NewProcessingError("invalid Entity Class for End Software Download response")
- }
- omci.Result = me.Results(data[4])
- if omci.Result > me.DeviceBusy {
- msg := fmt.Sprintf("invalid results for End Software Download response: %v, must be 0..6",
- omci.Result)
- return errors.New(msg)
- }
- omci.NumberOfInstances = data[5]
-
- if omci.NumberOfInstances > 9 {
- msg := fmt.Sprintf("invalid number of Instances: %v, must be 0..9",
- omci.NumberOfInstances)
- return errors.New(msg)
- }
- if omci.NumberOfInstances > 0 {
- omci.MeResults = make([]DownloadResults, omci.NumberOfInstances)
-
- for index := 0; index < int(omci.NumberOfInstances); index++ {
- omci.MeResults[index].ManagedEntityID = binary.BigEndian.Uint16(data[6+(index*3):])
- omci.MeResults[index].Result = me.Results(data[8+(index*3)])
- if omci.MeResults[index].Result > me.DeviceBusy {
- msg := fmt.Sprintf("invalid results for End Software Download instance %v response: %v, must be 0..6",
- index, omci.MeResults[index])
- return errors.New(msg)
- }
- }
- }
- return nil
-}
-
-func decodeEndSoftwareDownloadResponse(data []byte, p gopacket.PacketBuilder) error {
- omci := &EndSoftwareDownloadResponse{}
- omci.MsgLayerType = LayerTypeEndSoftwareDownloadResponse
- return decodingLayerDecoder(omci, data, p)
-}
-
-// SerializeTo provides serialization of an End Software Download Response message
-func (omci *EndSoftwareDownloadResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- err := omci.MeBasePacket.SerializeTo(b)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support End Software Download
- if !me.SupportsMsgType(meDefinition, me.EndSoftwareDownload) {
- return me.NewProcessingError("managed entity does not support End End Download Message-Type")
- }
- // Software Image Entity Class are always use the Software Image
- if omci.EntityClass != me.SoftwareImageClassID {
- return me.NewProcessingError("invalid Entity Class for End Download response")
- }
- bytes, err := b.AppendBytes(2 + (3 * int(omci.NumberOfInstances)))
- if err != nil {
- return err
- }
- if omci.Result > me.DeviceBusy {
- msg := fmt.Sprintf("invalid results for End Software Download response: %v, must be 0..6",
- omci.Result)
- return errors.New(msg)
- }
- bytes[0] = byte(omci.Result)
- bytes[1] = omci.NumberOfInstances
-
- if omci.NumberOfInstances > 9 {
- msg := fmt.Sprintf("invalid number of Instances: %v, must be 0..9",
- omci.NumberOfInstances)
- return errors.New(msg)
- }
- if omci.NumberOfInstances > 0 {
- for index := 0; index < int(omci.NumberOfInstances); index++ {
- binary.BigEndian.PutUint16(bytes[2+(3*index):], omci.MeResults[index].ManagedEntityID)
-
- if omci.MeResults[index].Result > me.DeviceBusy {
- msg := fmt.Sprintf("invalid results for End Software Download instance %v response: %v, must be 0..6",
- index, omci.MeResults[index])
- return errors.New(msg)
- }
- bytes[4+(3*index)] = byte(omci.MeResults[index].Result)
- }
- }
- return nil
-}
-
-/////////////////////////////////////////////////////////////////////////////
-//
-type ActivateSoftwareRequest struct {
- MeBasePacket // Note: EntityInstance for software download is two specific values
- ActivateFlags byte
-}
-
-func (omci *ActivateSoftwareRequest) String() string {
- return fmt.Sprintf("%v, Flags: %#x",
- omci.MeBasePacket.String(), omci.ActivateFlags)
-}
-
-// DecodeFromBytes decodes the given bytes of an Activate Software Request into this layer
-func (omci *ActivateSoftwareRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4+1)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support End Software Download
- if !me.SupportsMsgType(meDefinition, me.ActivateSoftware) {
- return me.NewProcessingError("managed entity does not support Activate Software Message-Type")
- }
- // Software Image Entity Class are always use the Software Image
- if omci.EntityClass != me.SoftwareImageClassID {
- return me.NewProcessingError("invalid Entity Class for Activate Software request")
- }
- omci.ActivateFlags = data[4]
- if omci.ActivateFlags > 2 {
- return me.NewProcessingError(fmt.Sprintf("invalid number of Activation flangs: %v, must be 0..2",
- omci.ActivateFlags))
- }
- return nil
-}
-
-func decodeActivateSoftwareRequest(data []byte, p gopacket.PacketBuilder) error {
- omci := &ActivateSoftwareRequest{}
- omci.MsgLayerType = LayerTypeActivateSoftwareRequest
- return decodingLayerDecoder(omci, data, p)
-}
-
-// SerializeTo provides serialization of an Activate Software message
-func (omci *ActivateSoftwareRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- err := omci.MeBasePacket.SerializeTo(b)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support End Software Download
- if !me.SupportsMsgType(meDefinition, me.ActivateSoftware) {
- return me.NewProcessingError("managed entity does not support Activate Message-Type")
- }
- // Software Image Entity Class are always use the Software Image
- if omci.EntityClass != me.SoftwareImageClassID {
- return me.NewProcessingError("invalid Entity Class for Activate Software request")
- }
- bytes, err := b.AppendBytes(1)
- if err != nil {
- return err
- }
- bytes[0] = omci.ActivateFlags
- if omci.ActivateFlags > 2 {
- msg := fmt.Sprintf("invalid results for Activate Software request: %v, must be 0..2",
- omci.ActivateFlags)
- return errors.New(msg)
- }
- return nil
-}
-
-/////////////////////////////////////////////////////////////////////////////
-//
-type ActivateSoftwareResponse struct {
- MeBasePacket
- Result me.Results
-}
-
-func (omci *ActivateSoftwareResponse) String() string {
- return fmt.Sprintf("%v, Result: %d (%v)",
- omci.MeBasePacket.String(), omci.Result, omci.Result)
-}
-
-// DecodeFromBytes decodes the given bytes of an Activate Softwre Response into this layer
-func (omci *ActivateSoftwareResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4+1)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support End Software Download
- if !me.SupportsMsgType(meDefinition, me.ActivateSoftware) {
- return me.NewProcessingError("managed entity does not support Activate Software Message-Type")
- }
- // Software Image Entity Class are always use the Software Image
- if omci.EntityClass != me.SoftwareImageClassID {
- return me.NewProcessingError("invalid Entity Class for Activate Software response")
- }
- omci.Result = me.Results(data[4])
- if omci.Result > me.Results(6) {
- msg := fmt.Sprintf("invalid results for Activate Software response: %v, must be 0..6",
- omci.Result)
- return errors.New(msg)
- }
- return nil
-}
-
-func decodeActivateSoftwareResponse(data []byte, p gopacket.PacketBuilder) error {
- omci := &ActivateSoftwareResponse{}
- omci.MsgLayerType = LayerTypeActivateSoftwareResponse
- return decodingLayerDecoder(omci, data, p)
-}
-
-// SerializeTo provides serialization of an Activate Software Response message
-func (omci *ActivateSoftwareResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- err := omci.MeBasePacket.SerializeTo(b)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support End Software Download
- if !me.SupportsMsgType(meDefinition, me.ActivateSoftware) {
- return me.NewProcessingError("managed entity does not support Activate Message-Type")
- }
- // Software Image Entity Class are always use the Software Image
- if omci.EntityClass != me.SoftwareImageClassID {
- return me.NewProcessingError("invalid Entity Class for Activate Software response")
- }
- bytes, err := b.AppendBytes(1)
- if err != nil {
- return err
- }
- bytes[0] = byte(omci.Result)
- if omci.Result > me.Results(6) {
- msg := fmt.Sprintf("invalid results for Activate Software response: %v, must be 0..6",
- omci.Result)
- return errors.New(msg)
- }
- return nil
-}
-
-/////////////////////////////////////////////////////////////////////////////
-//
-type CommitSoftwareRequest struct {
- MeBasePacket
-}
-
-func (omci *CommitSoftwareRequest) String() string {
- return fmt.Sprintf("%v", omci.MeBasePacket.String())
-}
-
-// DecodeFromBytes decodes the given bytes of a Commit Software Request into this layer
-func (omci *CommitSoftwareRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support End Software Download
- if !me.SupportsMsgType(meDefinition, me.CommitSoftware) {
- return me.NewProcessingError("managed entity does not support Commit Software Message-Type")
- }
- // Software Image Entity Class are always use the Software Image
- if omci.EntityClass != me.SoftwareImageClassID {
- return me.NewProcessingError("invalid Entity Class for Commit Software request")
- }
- return nil
-}
-
-func decodeCommitSoftwareRequest(data []byte, p gopacket.PacketBuilder) error {
- omci := &CommitSoftwareRequest{}
- omci.MsgLayerType = LayerTypeCommitSoftwareRequest
- return decodingLayerDecoder(omci, data, p)
-}
-
-// SerializeTo provides serialization of an Commit Software Request message
-func (omci *CommitSoftwareRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- err := omci.MeBasePacket.SerializeTo(b)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support End Software Download
- if !me.SupportsMsgType(meDefinition, me.CommitSoftware) {
- return me.NewProcessingError("managed entity does not support Commit Message-Type")
- }
- // Software Image Entity Class are always use the Software Image
- if omci.EntityClass != me.SoftwareImageClassID {
- return me.NewProcessingError("invalid Entity Class for Commit Software request")
- }
- return nil
-}
-
-/////////////////////////////////////////////////////////////////////////////
-//
-type CommitSoftwareResponse struct {
- MeBasePacket
- Result me.Results
-}
-
-func (omci *CommitSoftwareResponse) String() string {
- return fmt.Sprintf("%v", omci.MeBasePacket.String())
-}
-
-// DecodeFromBytes decodes the given bytes of a Commit Softwar Response into this layer
-func (omci *CommitSoftwareResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4+1)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Commit Software
- if !me.SupportsMsgType(meDefinition, me.CommitSoftware) {
- return me.NewProcessingError("managed entity does not support Commit Software Message-Type")
- }
- // Software Image Entity Class are always use the Software Image
- if omci.EntityClass != me.SoftwareImageClassID {
- return me.NewProcessingError("invalid Entity Class for Commit Software response")
- }
- omci.Result = me.Results(data[4])
- if omci.Result > me.Results(6) {
- msg := fmt.Sprintf("invalid results for Commit Software response: %v, must be 0..6",
- omci.Result)
- return errors.New(msg)
- }
- return nil
-}
-
-func decodeCommitSoftwareResponse(data []byte, p gopacket.PacketBuilder) error {
- omci := &CommitSoftwareResponse{}
- omci.MsgLayerType = LayerTypeCommitSoftwareResponse
- return decodingLayerDecoder(omci, data, p)
-}
-
-// SerializeTo provides serialization of an Commit Software Response message
-func (omci *CommitSoftwareResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- err := omci.MeBasePacket.SerializeTo(b)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Commit Software
- if !me.SupportsMsgType(meDefinition, me.CommitSoftware) {
- return me.NewProcessingError("managed entity does not support Commit Message-Type")
- }
- // Software Image Entity Class are always use the Software Image
- if omci.EntityClass != me.SoftwareImageClassID {
- return me.NewProcessingError("invalid Entity Class for Commit Software response")
- }
- bytes, err := b.AppendBytes(1)
- if err != nil {
- return err
- }
- bytes[0] = byte(omci.Result)
- if omci.Result > me.Results(6) {
- msg := fmt.Sprintf("invalid results for Commit Software response: %v, must be 0..6",
- omci.Result)
- return errors.New(msg)
- }
- return nil
-}
-
-/////////////////////////////////////////////////////////////////////////////
-//
-type SynchronizeTimeRequest struct {
- MeBasePacket
- Year uint16
- Month uint8
- Day uint8
- Hour uint8
- Minute uint8
- Second uint8
-}
-
-func (omci *SynchronizeTimeRequest) String() string {
- return fmt.Sprintf("%v, Date-Time: %d/%d/%d-%02d:%02d:%02d",
- omci.MeBasePacket.String(), omci.Year, omci.Month, omci.Day, omci.Hour, omci.Minute, omci.Second)
-}
-
-// DecodeFromBytes decodes the given bytes of a Synchronize Time Request into this layer
-func (omci *SynchronizeTimeRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4+7)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Synchronize Time
- if !me.SupportsMsgType(meDefinition, me.SynchronizeTime) {
- return me.NewProcessingError("managed entity does not support Synchronize Time Message-Type")
- }
- // Synchronize Time Entity Class are always ONU-G (256) and Entity Instance of 0
- if omci.EntityClass != me.OnuGClassID {
- return me.NewProcessingError("invalid Entity Class for Synchronize Time request")
- }
- if omci.EntityInstance != 0 {
- return me.NewUnknownInstanceError("invalid Entity Instance for Synchronize Time request")
- }
- omci.Year = binary.BigEndian.Uint16(data[4:6])
- omci.Month = data[6]
- omci.Day = data[7]
- omci.Hour = data[8]
- omci.Minute = data[9]
- omci.Second = data[10]
- return nil
-}
-
-func decodeSynchronizeTimeRequest(data []byte, p gopacket.PacketBuilder) error {
- omci := &SynchronizeTimeRequest{}
- omci.MsgLayerType = LayerTypeSynchronizeTimeRequest
- return decodingLayerDecoder(omci, data, p)
-}
-
-// SerializeTo provides serialization of an Synchronize Time Request message
-func (omci *SynchronizeTimeRequest) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- err := omci.MeBasePacket.SerializeTo(b)
- if err != nil {
- return err
- }
- entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Synchronize Time
- if !me.SupportsMsgType(entity, me.SynchronizeTime) {
- return me.NewProcessingError("managed entity does not support the Synchronize Time Message-Type")
- }
- bytes, err := b.AppendBytes(7)
- if err != nil {
- return err
- }
- binary.BigEndian.PutUint16(bytes[0:2], omci.Year)
- bytes[2] = omci.Month
- bytes[3] = omci.Day
- bytes[4] = omci.Hour
- bytes[5] = omci.Minute
- bytes[6] = omci.Second
- return nil
-}
-
-/////////////////////////////////////////////////////////////////////////////
-//
-type SynchronizeTimeResponse struct {
- MeBasePacket
- Result me.Results
- SuccessResults uint8 // Only if 'Result' is 0 -> success
-}
-
-func (omci *SynchronizeTimeResponse) String() string {
- return fmt.Sprintf("%v, Results: %d (%v), Success: %d",
- omci.MeBasePacket.String(), omci.Result, omci.Result, omci.SuccessResults)
-}
-
-// DecodeFromBytes decodes the given bytes of a Synchronize Time Response into this layer
-func (omci *SynchronizeTimeResponse) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4+2)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Synchronize Time
- if !me.SupportsMsgType(meDefinition, me.SynchronizeTime) {
- return me.NewProcessingError("managed entity does not support Synchronize Time Message-Type")
- }
- // Synchronize Time Entity Class are always ONU-G (256) and Entity Instance of 0
- if omci.EntityClass != me.OnuGClassID {
- return me.NewProcessingError("invalid Entity Class for Synchronize Time response")
- }
- if omci.EntityInstance != 0 {
- return me.NewUnknownInstanceError("invalid Entity Instance for Synchronize Time response")
- }
- omci.Result = me.Results(data[4])
- if omci.Result > me.DeviceBusy {
- msg := fmt.Sprintf("invalid results code: %v, must be 0..6", omci.Result)
- return errors.New(msg)
- }
- omci.SuccessResults = data[5]
- return nil
-}
-
-func decodeSynchronizeTimeResponse(data []byte, p gopacket.PacketBuilder) error {
- omci := &SynchronizeTimeResponse{}
- omci.MsgLayerType = LayerTypeSynchronizeTimeResponse
- return decodingLayerDecoder(omci, data, p)
-}
-
-// SerializeTo provides serialization of an Synchronize Time Response message
-func (omci *SynchronizeTimeResponse) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
- // Basic (common) OMCI Header is 8 octets, 10
- err := omci.MeBasePacket.SerializeTo(b)
- if err != nil {
- return err
- }
- entity, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // Synchronize Time Entity Class are always ONU DATA (2) and Entity Instance of 0
- if omci.EntityClass != me.OnuGClassID {
- return me.NewProcessingError("invalid Entity Class for Synchronize Time response")
- }
- if omci.EntityInstance != 0 {
- return me.NewUnknownInstanceError("invalid Entity Instance for Synchronize Time response")
- }
- // ME needs to support Synchronize Time
- if !me.SupportsMsgType(entity, me.SynchronizeTime) {
- return me.NewProcessingError("managed entity does not support the Synchronize Time Message-Type")
- }
- numBytes := 2
- if omci.Result != me.Success {
- numBytes = 1
- }
- bytes, err := b.AppendBytes(numBytes)
- if err != nil {
- return err
- }
- bytes[0] = uint8(omci.Result)
- if omci.Result == me.Success {
- bytes[1] = omci.SuccessResults
- }
- return nil
-}
-
-/////////////////////////////////////////////////////////////////////////////
-//
-type RebootRequest struct {
- MeBasePacket
- RebootCondition byte
-}
-
-func (omci *RebootRequest) String() string {
- return fmt.Sprintf("%v, Reboot Condition: %v",
- omci.MeBasePacket.String(), omci.RebootCondition)
-}
-
-// DecodeFromBytes decodes the given bytes of a Reboot Request into this layer
-func (omci *RebootRequest) DecodeFromBytes(data []byte, p gopacket.PacketBuilder) error {
- // Common ClassID/EntityID decode in msgBase
- err := omci.MeBasePacket.DecodeFromBytes(data, p, 4+1)
- if err != nil {
- return err
- }
- meDefinition, omciErr := me.LoadManagedEntityDefinition(omci.EntityClass,
- me.ParamData{EntityID: omci.EntityInstance})
- if omciErr.StatusCode() != me.Success {
- return omciErr.GetError()
- }
- // ME needs to support Reboot
- if !me.SupportsMsgType(meDefinition, me.Reboot) {
- return me.NewProcessingError("managed entity does not support Reboot Message-Type")
- }
- omci.RebootCondition = data[4]
- if omci.RebootCondition > 3 {
- msg := fmt.Sprintf("invalid reboot condition code: %v, must be 0..3", omci.RebootCondition)
- return errors.New(msg)
- }