[VOL-3542] Support Examine-MDS-handling
- counterpart to verify BBSIM-feature [VOL-3744] BBSIM-ONUs should support MDS-feature according to T-REC-G.988
Change-Id: Iff0579d8b1320beeac570af7e4a84a29f70ab022
diff --git a/internal/pkg/onuadaptercore/omci_cc.go b/internal/pkg/onuadaptercore/omci_cc.go
index c8ad45f..6d336f4 100644
--- a/internal/pkg/onuadaptercore/omci_cc.go
+++ b/internal/pkg/onuadaptercore/omci_cc.go
@@ -112,6 +112,16 @@
pLastTxMeInstance *me.ManagedEntity
}
+var responsesWithMibDataSync = []omci.MessageType{
+ omci.CreateResponseType,
+ omci.DeleteResponseType,
+ omci.SetResponseType,
+ omci.StartSoftwareDownloadResponseType,
+ omci.EndSoftwareDownloadResponseType,
+ omci.ActivateSoftwareResponseType,
+ omci.CommitSoftwareResponseType,
+}
+
//newOmciCC constructor returns a new instance of a OmciCC
//mib_db (as well as not inluded alarm_db not really used in this code? VERIFY!!)
func newOmciCC(ctx context.Context, onuDeviceEntry *OnuDeviceEntry,
@@ -278,6 +288,9 @@
//disadvantage of decoupling: error verification made difficult, but anyway the question is
// how to react on erroneous frame reception, maybe can simply be ignored
go rxCallbackEntry.cbFunction(ctx, omciMsg, &packet, rxCallbackEntry.cbRespChannel)
+ if isResponseWithMibDataSync(omciMsg.MessageType) {
+ oo.pOnuDeviceEntry.incrementMibDataSync(ctx)
+ }
// having posted the response the request is regarded as 'done'
delete(oo.rxSchedulerMap, omciMsg.TransactionID)
oo.mutexRxSchedMap.Unlock()
@@ -2137,3 +2150,12 @@
"device-id": oo.deviceID})
return nil
}
+
+func isResponseWithMibDataSync(msgType omci.MessageType) bool {
+ for _, v := range responsesWithMibDataSync {
+ if v == msgType {
+ return true
+ }
+ }
+ return false
+}