VOL-2263: Issues with creating itu-pon-alloc object
- Wait for asynchronous ITU PON Alloc Configuration Completed
indication before reporting the response to CreateSched/RemoveSched
from voltha.
Change-Id: I56a06970625e891e197ff9d87e02d73b06070af5
diff --git a/agent/common/core.h b/agent/common/core.h
index bfb6c9b..4e79d2c 100644
--- a/agent/common/core.h
+++ b/agent/common/core.h
@@ -38,7 +38,7 @@
BCM_LOG(level, id, "%s" fmt "%s", LIGHT_GREEN, ##__VA_ARGS__, NONE); \
else \
BCM_LOG(INFO, id, fmt, ##__VA_ARGS__);
-#define COLLECTION_PERIOD 15
+#define COLLECTION_PERIOD 15 // in seconds
#define BAL_DYNAMIC_LIST_BUFFER_SIZE (32 * 1024)
#define MAX_REGID_LENGTH 36
@@ -74,6 +74,33 @@
STATE = 26
};
+enum AllocCfgAction {
+ ALLOC_OBJECT_CREATE,
+ ALLOC_OBJECT_DELETE
+};
+
+enum AllocObjectState {
+ ALLOC_OBJECT_STATE_NOT_CONFIGURED,
+ ALLOC_OBJECT_STATE_INACTIVE,
+ ALLOC_OBJECT_STATE_PROCESSING,
+ ALLOC_OBJECT_STATE_ACTIVE
+};
+
+enum AllocCfgStatus {
+ ALLOC_CFG_STATUS_SUCCESS,
+ ALLOC_CFG_STATUS_FAIL
+};
+
+typedef struct {
+ uint32_t pon_intf_id;
+ uint32_t alloc_id;
+ AllocObjectState state;
+ AllocCfgStatus status;
+} alloc_cfg_complete_result;
+
+// key for map used for tracking ITU PON Alloc Configuration results from BAL
+typedef std::tuple<uint32_t, uint32_t> alloc_cfg_compltd_key;
+
Status Enable_(int argc, char *argv[]);
Status ActivateOnu_(uint32_t intf_id, uint32_t onu_id,
const char *vendor_id, const char *vendor_specific, uint32_t pir);